Skip to content

Commit a2b25b2

Browse files
committed
fix: Updates from testing and validating self-managed node group
1 parent e4c63d2 commit a2b25b2

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

docs/UPGRADE-21.0.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ module "eks" {
208208
version = "~> 20.0"
209209
210210
# Truncated for brevity ...
211-
# Not all renamed variables are shown here, please refer to the full list above.
211+
# Renamed variables are not shown here, please refer to the full list above.
212212
213213
enable_efa_support = true
214214
@@ -269,7 +269,7 @@ module "eks" {
269269
version = "~> 21.0"
270270
271271
# Truncated for brevity ...
272-
# Not all renamed variables are shown here, please refer to the full list above.
272+
# Renamed variables are not shown here, please refer to the full list above.
273273
274274
eks_managed_node_groups = {
275275
efa = {
@@ -323,3 +323,5 @@ module "eks" {
323323
```
324324

325325
### State Changes
326+
327+
No state changes required.

modules/self-managed-node-group/main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -423,17 +423,17 @@ resource "aws_launch_template" "this" {
423423
}
424424

425425
dynamic "placement" {
426-
for_each = length(var.placement) > 0 || local.create_placement_group ? [var.placement] : []
426+
for_each = var.placement != null || local.create_placement_group ? [var.placement] : []
427427

428428
content {
429-
affinity = placement.value.affinity
430-
availability_zone = placement.value.availability_zone
429+
affinity = try(placement.value.affinity, null)
430+
availability_zone = try(placement.value.availability_zone, null)
431431
group_name = try(aws_placement_group.this[0].name, placement.value.group_name)
432-
host_id = placement.value.host_id
433-
host_resource_group_arn = placement.value.host_resource_group_arn
434-
partition_number = placement.value.partition_number
435-
spread_domain = placement.value.spread_domain
436-
tenancy = placement.value.tenancy
432+
host_id = try(placement.value.host_id, null)
433+
host_resource_group_arn = try(placement.value.host_resource_group_arn, null)
434+
partition_number = try(placement.value.partition_number, null)
435+
spread_domain = try(placement.value.spread_domain, null)
436+
tenancy = try(placement.value.tenancy, null)
437437
}
438438
}
439439

tests/self-managed-node-group/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,15 @@ module "eks" {
4545
most_recent = true
4646
}
4747
eks-pod-identity-agent = {
48-
most_recent = true
48+
before_compute = true
49+
most_recent = true
4950
}
5051
kube-proxy = {
5152
most_recent = true
5253
}
5354
vpc-cni = {
54-
most_recent = true
55+
before_compute = true
56+
most_recent = true
5557
pod_identity_association = [{
5658
role_arn = module.aws_vpc_cni_ipv4_pod_identity.iam_role_arn
5759
service_account = "aws-node"

0 commit comments

Comments
 (0)