Skip to content

Commit aeb9f0c

Browse files
authored
fix: Ensure the correct service CIDR and IP family is used in the rendered user data (#2963)
* fix: Ensuring the correct service CIDR and IP family is used in the rendered user data * chore: Updates from testing and validating * chore: Fix example destroy instructions * fix: Only require `cluster_service_cidr` when `create = true` * chore: Clean up commented out code and add note on check length
1 parent 907f70c commit aeb9f0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+384
-148
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.88.0
3+
rev: v1.88.1
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
188188

189189
| Name | Version |
190190
|------|---------|
191-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
191+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
192192
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
193193
| <a name="requirement_time"></a> [time](#requirement\_time) | >= 0.9 |
194194
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 3.0 |
@@ -352,12 +352,14 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
352352
| <a name="output_cluster_iam_role_unique_id"></a> [cluster\_iam\_role\_unique\_id](#output\_cluster\_iam\_role\_unique\_id) | Stable and unique string identifying the IAM role |
353353
| <a name="output_cluster_id"></a> [cluster\_id](#output\_cluster\_id) | The ID of the EKS cluster. Note: currently a value is returned only for local EKS clusters created on Outposts |
354354
| <a name="output_cluster_identity_providers"></a> [cluster\_identity\_providers](#output\_cluster\_identity\_providers) | Map of attribute maps for all EKS identity providers enabled |
355+
| <a name="output_cluster_ip_family"></a> [cluster\_ip\_family](#output\_cluster\_ip\_family) | The IP family used by the cluster (e.g. `ipv4` or `ipv6`) |
355356
| <a name="output_cluster_name"></a> [cluster\_name](#output\_cluster\_name) | The name of the EKS cluster |
356357
| <a name="output_cluster_oidc_issuer_url"></a> [cluster\_oidc\_issuer\_url](#output\_cluster\_oidc\_issuer\_url) | The URL on the EKS cluster for the OpenID Connect identity provider |
357358
| <a name="output_cluster_platform_version"></a> [cluster\_platform\_version](#output\_cluster\_platform\_version) | Platform version for the cluster |
358359
| <a name="output_cluster_primary_security_group_id"></a> [cluster\_primary\_security\_group\_id](#output\_cluster\_primary\_security\_group\_id) | Cluster security group that was created by Amazon EKS for the cluster. Managed node groups use this security group for control-plane-to-data-plane communication. Referred to as 'Cluster security group' in the EKS console |
359360
| <a name="output_cluster_security_group_arn"></a> [cluster\_security\_group\_arn](#output\_cluster\_security\_group\_arn) | Amazon Resource Name (ARN) of the cluster security group |
360361
| <a name="output_cluster_security_group_id"></a> [cluster\_security\_group\_id](#output\_cluster\_security\_group\_id) | ID of the cluster security group |
362+
| <a name="output_cluster_service_cidr"></a> [cluster\_service\_cidr](#output\_cluster\_service\_cidr) | The CIDR block where Kubernetes pod and service IP addresses are assigned from |
361363
| <a name="output_cluster_status"></a> [cluster\_status](#output\_cluster\_status) | Status of the EKS cluster. One of `CREATING`, `ACTIVE`, `DELETING`, `FAILED` |
362364
| <a name="output_cluster_tls_certificate_sha1_fingerprint"></a> [cluster\_tls\_certificate\_sha1\_fingerprint](#output\_cluster\_tls\_certificate\_sha1\_fingerprint) | The SHA1 fingerprint of the public key of the cluster's certificate |
363365
| <a name="output_cluster_version"></a> [cluster\_version](#output\_cluster\_version) | The Kubernetes version for the cluster |

examples/eks_managed_node_group/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Note that this example may create resources which cost money. Run `terraform des
2929

3030
| Name | Version |
3131
|------|---------|
32-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
32+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
3333
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
3434

3535
## Providers

examples/eks_managed_node_group/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,10 @@ module "disabled_eks" {
357357
module "eks_managed_node_group" {
358358
source = "../../modules/eks-managed-node-group"
359359

360-
name = "separate-eks-mng"
361-
cluster_name = module.eks.cluster_name
362-
cluster_version = module.eks.cluster_version
360+
name = "separate-eks-mng"
361+
cluster_name = module.eks.cluster_name
362+
cluster_ip_family = module.eks.cluster_ip_family
363+
cluster_service_cidr = module.eks.cluster_service_cidr
363364

364365
subnet_ids = module.vpc.private_subnets
365366
cluster_primary_security_group_id = module.eks.cluster_primary_security_group_id

examples/eks_managed_node_group/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3"
2+
required_version = ">= 1.3.2"
33

44
required_providers {
55
aws = {

examples/fargate_profile/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Note that this example may create resources which cost money. Run `terraform des
1919

2020
| Name | Version |
2121
|------|---------|
22-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
22+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
2323
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
2424

2525
## Providers

examples/fargate_profile/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3"
2+
required_version = ">= 1.3.2"
33

44
required_providers {
55
aws = {

examples/karpenter/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ kubectl delete node -l karpenter.sh/provisioner-name=default
4343
```bash
4444
# Necessary to avoid removing Terraform's permissions too soon before its finished
4545
# cleaning up the resources it deployed inside the cluster
46-
terraform state rm 'module.eks.aws_eks_access_entry.this["cluster_creator_admin"]' || true
46+
terraform state rm 'module.eks.aws_eks_access_entry.this["cluster_creator"]' || true
47+
terraform state rm 'module.eks.aws_eks_access_policy_association.this["cluster_creator_admin"]' || true
48+
4749
terraform destroy
4850
```
4951

@@ -54,7 +56,7 @@ Note that this example may create resources which cost money. Run `terraform des
5456

5557
| Name | Version |
5658
|------|---------|
57-
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
59+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
5860
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
5961
| <a name="requirement_helm"></a> [helm](#requirement\_helm) | >= 2.7 |
6062
| <a name="requirement_kubectl"></a> [kubectl](#requirement\_kubectl) | >= 2.0 |

examples/karpenter/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ resource "helm_release" "karpenter" {
169169
repository_username = data.aws_ecrpublic_authorization_token.token.user_name
170170
repository_password = data.aws_ecrpublic_authorization_token.token.password
171171
chart = "karpenter"
172-
version = "v0.34.0"
172+
version = "0.35.1"
173173
wait = false
174174

175175
values = [

examples/karpenter/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
terraform {
2-
required_version = ">= 1.3"
2+
required_version = ">= 1.3.2"
33

44
required_providers {
55
aws = {

0 commit comments

Comments
 (0)