-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Not to iterate over remote_access object in dynamic block #1743
fix: Not to iterate over remote_access object in dynamic block #1743
Conversation
03f0620
to
3d8af0d
Compare
@@ -295,7 +295,7 @@ resource "aws_eks_node_group" "this" { | |||
} | |||
|
|||
dynamic "remote_access" { | |||
for_each = var.remote_access | |||
for_each = length(var.remote_access) > 0 ? [var.remote_access] : [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just testing locally looks like we also need to change lines 300-301 to:
ec2_ssh_key = try(remote_access.value.ec2_ssh_key, null)
source_security_group_ids = try(remote_access.value.source_security_group_ids, [])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! I have applied your fix and verified it locally. Thanks!
3d8af0d
to
c3d6c5b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the patch @knight42 🎉
### [18.0.4](v18.0.3...v18.0.4) (2022-01-07) ### Bug Fixes * Not to iterate over remote_access object in dynamic block ([#1743](#1743)) ([86b3c33](86b3c33))
This PR is included in version 18.0.4 🎉 |
### [18.0.4](terraform-aws-modules/terraform-aws-eks@v18.0.3...v18.0.4) (2022-01-07) ### Bug Fixes * Not to iterate over remote_access object in dynamic block ([#1743](terraform-aws-modules/terraform-aws-eks#1743)) ([ff8f236](terraform-aws-modules/terraform-aws-eks@ff8f236))
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Motivation and Context
Currently if user specifies
remote_access
ineks_managed_node_groups
, terraform will throw an error since we iterate theremote_access
object directly, which is not expected.Breaking Changes
How Has This Been Tested?
examples/*
projects