Skip to content

Commit 76ed997

Browse files
feat: Add support bootstrap_self_managed_addons (#236)
* feat: Add support bootstrap_self_managed_addons * feat: adjust variable to naming convention * feat: change variable name
1 parent 98ef10c commit 76ed997

File tree

6 files changed

+25
-8
lines changed

6 files changed

+25
-8
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ Available targets:
411411
| <a name="input_allowed_security_group_ids"></a> [allowed\_security\_group\_ids](#input\_allowed\_security\_group\_ids) | A list of IDs of Security Groups to allow access to the cluster. | `list(string)` | `[]` | no |
412412
| <a name="input_associated_security_group_ids"></a> [associated\_security\_group\_ids](#input\_associated\_security\_group\_ids) | A list of IDs of Security Groups to associate the cluster with.<br>These security groups will not be modified. | `list(string)` | `[]` | no |
413413
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
414+
| <a name="input_bootstrap_self_managed_addons_enabled"></a> [bootstrap\_self\_managed\_addons\_enabled](#input\_bootstrap\_self\_managed\_addons\_enabled) | Manages bootstrap of default networking addons after cluster has been created | `bool` | `null` | no |
414415
| <a name="input_cloudwatch_log_group_class"></a> [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS` | `string` | `null` | no |
415416
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If provided, the KMS Key ID to use to encrypt AWS CloudWatch logs | `string` | `null` | no |
416417
| <a name="input_cluster_attributes"></a> [cluster\_attributes](#input\_cluster\_attributes) | Override label module default cluster attributes | `list(string)` | <pre>[<br> "cluster"<br>]</pre> | no |

docs/terraform.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@
6666
| <a name="input_allowed_security_group_ids"></a> [allowed\_security\_group\_ids](#input\_allowed\_security\_group\_ids) | A list of IDs of Security Groups to allow access to the cluster. | `list(string)` | `[]` | no |
6767
| <a name="input_associated_security_group_ids"></a> [associated\_security\_group\_ids](#input\_associated\_security\_group\_ids) | A list of IDs of Security Groups to associate the cluster with.<br>These security groups will not be modified. | `list(string)` | `[]` | no |
6868
| <a name="input_attributes"></a> [attributes](#input\_attributes) | ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`,<br>in the order they appear in the list. New attributes are appended to the<br>end of the list. The elements of the list are joined by the `delimiter`<br>and treated as a single ID element. | `list(string)` | `[]` | no |
69+
| <a name="input_bootstrap_self_managed_addons_enabled"></a> [bootstrap\_self\_managed\_addons\_enabled](#input\_bootstrap\_self\_managed\_addons\_enabled) | Manages bootstrap of default networking addons after cluster has been created | `bool` | `null` | no |
70+
| <a name="input_cloudwatch_log_group_class"></a> [cloudwatch\_log\_group\_class](#input\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: `STANDARD` or `INFREQUENT_ACCESS` | `string` | `null` | no |
6971
| <a name="input_cloudwatch_log_group_kms_key_id"></a> [cloudwatch\_log\_group\_kms\_key\_id](#input\_cloudwatch\_log\_group\_kms\_key\_id) | If provided, the KMS Key ID to use to encrypt AWS CloudWatch logs | `string` | `null` | no |
7072
| <a name="input_cluster_attributes"></a> [cluster\_attributes](#input\_cluster\_attributes) | Override label module default cluster attributes | `list(string)` | <pre>[<br> "cluster"<br>]</pre> | no |
7173
| <a name="input_cluster_depends_on"></a> [cluster\_depends\_on](#input\_cluster\_depends\_on) | If provided, the EKS will depend on this object, and therefore not be created until this object is finalized.<br>This is useful if you want to ensure that the cluster is not created before some other condition is met, e.g. VPNs into the subnet are created. | `any` | `null` | no |

examples/complete/main.tf

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,9 @@ module "eks_cluster" {
110110
cluster_encryption_config_kms_key_policy = var.cluster_encryption_config_kms_key_policy
111111
cluster_encryption_config_resources = var.cluster_encryption_config_resources
112112

113-
addons = local.addons
114-
addons_depends_on = [module.eks_node_group]
113+
addons = local.addons
114+
addons_depends_on = [module.eks_node_group]
115+
bootstrap_self_managed_addons_enabled = var.bootstrap_self_managed_addons_enabled
115116

116117
access_entry_map = local.access_entry_map
117118
access_config = {

examples/complete/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ variable "addons" {
109109
description = "Manages [`aws_eks_addon`](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/eks_addon) resources."
110110
}
111111

112+
variable "bootstrap_self_managed_addons_enabled" {
113+
description = "Manages bootstrap of default networking addons after cluster has been created"
114+
type = bool
115+
default = null
116+
}
117+
112118
variable "private_ipv6_enabled" {
113119
type = bool
114120
default = false

main.tf

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ resource "aws_kms_alias" "cluster" {
5656
resource "aws_eks_cluster" "default" {
5757
#bridgecrew:skip=BC_AWS_KUBERNETES_1:Allow permissive security group for public access, difficult to restrict without a VPN
5858
#bridgecrew:skip=BC_AWS_KUBERNETES_4:Let user decide on control plane logging, not necessary in non-production environments
59-
count = local.enabled ? 1 : 0
60-
name = module.label.id
61-
tags = module.label.tags
62-
role_arn = local.eks_service_role_arn
63-
version = var.kubernetes_version
64-
enabled_cluster_log_types = var.enabled_cluster_log_types
59+
count = local.enabled ? 1 : 0
60+
name = module.label.id
61+
tags = module.label.tags
62+
role_arn = local.eks_service_role_arn
63+
version = var.kubernetes_version
64+
enabled_cluster_log_types = var.enabled_cluster_log_types
65+
bootstrap_self_managed_addons = var.bootstrap_self_managed_addons_enabled
6566

6667
access_config {
6768
authentication_mode = var.access_config.authentication_mode

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ variable "addons_depends_on" {
197197
default = null
198198
}
199199

200+
variable "bootstrap_self_managed_addons_enabled" {
201+
description = "Manages bootstrap of default networking addons after cluster has been created"
202+
type = bool
203+
default = null
204+
}
205+
200206
variable "cluster_attributes" {
201207
type = list(string)
202208
description = "Override label module default cluster attributes"

0 commit comments

Comments
 (0)