Skip to content

Commit 6c56e2a

Browse files
fix: Ensure isra_tag_values can be tried before defaulting to cluster_name on Karpenter module (#2631)
Co-authored-by: Bryant Biggs <[email protected]>
1 parent f741db1 commit 6c56e2a

File tree

22 files changed

+52
-77
lines changed

22 files changed

+52
-77
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.79.1
3+
rev: v1.80.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_validate

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module "eks" {
7878
version = "~> 19.0"
7979
8080
cluster_name = "my-cluster"
81-
cluster_version = "1.24"
81+
cluster_version = "1.27"
8282
8383
cluster_endpoint_public_access = true
8484
@@ -318,7 +318,7 @@ We are grateful to the community for contributing bugfixes and improvements! Ple
318318
| <a name="input_cluster_service_ipv6_cidr"></a> [cluster\_service\_ipv6\_cidr](#input\_cluster\_service\_ipv6\_cidr) | The CIDR block to assign Kubernetes pod and service IP addresses from if `ipv6` was specified when the cluster was created. Kubernetes assigns service addresses from the unique local address range (fc00::/7) because you can't specify a custom IPv6 CIDR block when you create the cluster | `string` | `null` | no |
319319
| <a name="input_cluster_tags"></a> [cluster\_tags](#input\_cluster\_tags) | A map of additional tags to add to the cluster | `map(string)` | `{}` | no |
320320
| <a name="input_cluster_timeouts"></a> [cluster\_timeouts](#input\_cluster\_timeouts) | Create, update, and delete timeout configurations for the cluster | `map(string)` | `{}` | no |
321-
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Kubernetes `<major>.<minor>` version to use for the EKS cluster (i.e.: `1.24`) | `string` | `null` | no |
321+
| <a name="input_cluster_version"></a> [cluster\_version](#input\_cluster\_version) | Kubernetes `<major>.<minor>` version to use for the EKS cluster (i.e.: `1.27`) | `string` | `null` | no |
322322
| <a name="input_control_plane_subnet_ids"></a> [control\_plane\_subnet\_ids](#input\_control\_plane\_subnet\_ids) | A list of subnet IDs where the EKS cluster control plane (ENIs) will be provisioned. Used for expanding the pool of subnets used by nodes/node groups without replacing the EKS control plane | `list(string)` | `[]` | no |
323323
| <a name="input_create"></a> [create](#input\_create) | Controls if EKS resources should be created (affects nearly all resources) | `bool` | `true` | no |
324324
| <a name="input_create_aws_auth_configmap"></a> [create\_aws\_auth\_configmap](#input\_create\_aws\_auth\_configmap) | Determines whether to create the aws-auth configmap. NOTE - this is only intended for scenarios where the configmap does not exist (i.e. - when using only self-managed node groups). Most users should use `manage_aws_auth_configmap` | `bool` | `false` | no |

docs/compute_resources.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ Refer to the [Self Managed Node Group documentation](https://docs.aws.amazon.com
115115
1. The `self-managed-node-group` uses the latest AWS EKS Optimized AMI (Linux) for the given Kubernetes version by default:
116116

117117
```hcl
118-
cluster_version = "1.24"
118+
cluster_version = "1.27"
119119
120-
# This self managed node group will use the latest AWS EKS Optimized AMI for Kubernetes 1.24
120+
# This self managed node group will use the latest AWS EKS Optimized AMI for Kubernetes 1.27
121121
self_managed_node_groups = {
122122
default = {}
123123
}
@@ -126,7 +126,7 @@ Refer to the [Self Managed Node Group documentation](https://docs.aws.amazon.com
126126
2. To use Bottlerocket, specify the `platform` as `bottlerocket` and supply a Bottlerocket OS AMI:
127127

128128
```hcl
129-
cluster_version = "1.24"
129+
cluster_version = "1.27"
130130
131131
self_managed_node_groups = {
132132
bottlerocket = {

docs/irsa_integration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module "eks" {
88
source = "terraform-aws-modules/eks/aws"
99
1010
cluster_name = "example"
11-
cluster_version = "1.24"
11+
cluster_version = "1.27"
1212
1313
cluster_addons = {
1414
vpc-cni = {

examples/complete/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ Note that this example may create resources which cost money. Run `terraform des
5454
| <a name="module_eks"></a> [eks](#module\_eks) | ../.. | n/a |
5555
| <a name="module_eks_managed_node_group"></a> [eks\_managed\_node\_group](#module\_eks\_managed\_node\_group) | ../../modules/eks-managed-node-group | n/a |
5656
| <a name="module_fargate_profile"></a> [fargate\_profile](#module\_fargate\_profile) | ../../modules/fargate-profile | n/a |
57-
| <a name="module_kms"></a> [kms](#module\_kms) | terraform-aws-modules/kms/aws | 1.1.0 |
57+
| <a name="module_kms"></a> [kms](#module\_kms) | terraform-aws-modules/kms/aws | ~> 1.5 |
5858
| <a name="module_self_managed_node_group"></a> [self\_managed\_node\_group](#module\_self\_managed\_node\_group) | ../../modules/self-managed-node-group | n/a |
59-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
59+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 4.0 |
6060

6161
## Resources
6262

examples/complete/main.tf

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ module "disabled_self_managed_node_group" {
397397

398398
module "vpc" {
399399
source = "terraform-aws-modules/vpc/aws"
400-
version = "~> 3.0"
400+
version = "~> 4.0"
401401

402402
name = local.name
403403
cidr = local.vpc_cidr
@@ -407,13 +407,8 @@ module "vpc" {
407407
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 48)]
408408
intra_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 52)]
409409

410-
enable_nat_gateway = true
411-
single_nat_gateway = true
412-
enable_dns_hostnames = true
413-
414-
enable_flow_log = true
415-
create_flow_log_cloudwatch_iam_role = true
416-
create_flow_log_cloudwatch_log_group = true
410+
enable_nat_gateway = true
411+
single_nat_gateway = true
417412

418413
public_subnet_tags = {
419414
"kubernetes.io/role/elb" = 1
@@ -463,7 +458,7 @@ resource "aws_iam_policy" "additional" {
463458

464459
module "kms" {
465460
source = "terraform-aws-modules/kms/aws"
466-
version = "1.1.0"
461+
version = "~> 1.5"
467462

468463
aliases = ["eks/${local.name}"]
469464
description = "${local.name} cluster encryption key"

examples/eks_managed_node_group/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Note that this example may create resources which cost money. Run `terraform des
4646
| <a name="module_ebs_kms_key"></a> [ebs\_kms\_key](#module\_ebs\_kms\_key) | terraform-aws-modules/kms/aws | ~> 1.5 |
4747
| <a name="module_eks"></a> [eks](#module\_eks) | ../.. | n/a |
4848
| <a name="module_key_pair"></a> [key\_pair](#module\_key\_pair) | terraform-aws-modules/key-pair/aws | ~> 2.0 |
49-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
49+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 4.0 |
5050
| <a name="module_vpc_cni_irsa"></a> [vpc\_cni\_irsa](#module\_vpc\_cni\_irsa) | terraform-aws-modules/iam/aws//modules/iam-role-for-service-accounts-eks | ~> 5.0 |
5151

5252
## Resources

examples/eks_managed_node_group/main.tf

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ data "aws_availability_zones" "available" {}
1919

2020
locals {
2121
name = "ex-${replace(basename(path.cwd), "_", "-")}"
22-
cluster_version = "1.24"
22+
cluster_version = "1.27"
2323
region = "eu-west-1"
2424

2525
vpc_cidr = "10.0.0.0/16"
@@ -300,7 +300,7 @@ module "eks" {
300300

301301
module "vpc" {
302302
source = "terraform-aws-modules/vpc/aws"
303-
version = "~> 3.0"
303+
version = "~> 4.0"
304304

305305
name = local.name
306306
cidr = local.vpc_cidr
@@ -310,21 +310,17 @@ module "vpc" {
310310
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 48)]
311311
intra_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 52)]
312312

313-
enable_ipv6 = true
314-
assign_ipv6_address_on_creation = true
315-
create_egress_only_igw = true
316-
317-
public_subnet_ipv6_prefixes = [0, 1, 2]
318-
private_subnet_ipv6_prefixes = [3, 4, 5]
319-
intra_subnet_ipv6_prefixes = [6, 7, 8]
320-
321-
enable_nat_gateway = true
322-
single_nat_gateway = true
323-
enable_dns_hostnames = true
324-
325-
enable_flow_log = true
326-
create_flow_log_cloudwatch_iam_role = true
327-
create_flow_log_cloudwatch_log_group = true
313+
enable_nat_gateway = true
314+
single_nat_gateway = true
315+
enable_ipv6 = true
316+
create_egress_only_igw = true
317+
318+
public_subnet_ipv6_prefixes = [0, 1, 2]
319+
public_subnet_assign_ipv6_address_on_creation = true
320+
private_subnet_ipv6_prefixes = [3, 4, 5]
321+
private_subnet_assign_ipv6_address_on_creation = true
322+
intra_subnet_ipv6_prefixes = [6, 7, 8]
323+
intra_subnet_assign_ipv6_address_on_creation = true
328324

329325
public_subnet_tags = {
330326
"kubernetes.io/role/elb" = 1

examples/fargate_profile/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Note that this example may create resources which cost money. Run `terraform des
3535
| Name | Source | Version |
3636
|------|--------|---------|
3737
| <a name="module_eks"></a> [eks](#module\_eks) | ../.. | n/a |
38-
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 3.0 |
38+
| <a name="module_vpc"></a> [vpc](#module\_vpc) | terraform-aws-modules/vpc/aws | ~> 4.0 |
3939

4040
## Resources
4141

examples/fargate_profile/main.tf

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ data "aws_availability_zones" "available" {}
66

77
locals {
88
name = "ex-${replace(basename(path.cwd), "_", "-")}"
9-
cluster_version = "1.24"
9+
cluster_version = "1.27"
1010
region = "eu-west-1"
1111

1212
vpc_cidr = "10.0.0.0/16"
@@ -106,7 +106,7 @@ module "eks" {
106106

107107
module "vpc" {
108108
source = "terraform-aws-modules/vpc/aws"
109-
version = "~> 3.0"
109+
version = "~> 4.0"
110110

111111
name = local.name
112112
cidr = local.vpc_cidr
@@ -116,13 +116,8 @@ module "vpc" {
116116
public_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 48)]
117117
intra_subnets = [for k, v in local.azs : cidrsubnet(local.vpc_cidr, 8, k + 52)]
118118

119-
enable_nat_gateway = true
120-
single_nat_gateway = true
121-
enable_dns_hostnames = true
122-
123-
enable_flow_log = true
124-
create_flow_log_cloudwatch_iam_role = true
125-
create_flow_log_cloudwatch_log_group = true
119+
enable_nat_gateway = true
120+
single_nat_gateway = true
126121

127122
public_subnet_tags = {
128123
"kubernetes.io/role/elb" = 1

0 commit comments

Comments
 (0)