Skip to content
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: Call to lookup() closed too early, breaks sg rule creation in cluster sg if custom source sg is defined. #2319

Conversation

AdamStaudt
Copy link
Contributor

Description

fixed typo in nested lookup() calls in aws_security_group_rule.cluster resource

Motivation and Context

If a security group ID is supplied in the source_security_group_id parameter to cluster_security_group_additional_rules, the ternary operator will break, as the nested lookup() function will return a string rather than a bool.

Breaking Changes

No breaking changes.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

Change was tested on production code within our organisation, which creates a SG rule with an external SG as its source. The same input worked under v18 and broke under v19.

@AdamStaudt AdamStaudt changed the title fix: lookup() closed too early, breaks sg rule creation in cluster sg if custom source sg is defined. Fix: lookup() closed too early, breaks sg rule creation in cluster sg if custom source sg is defined. Dec 6, 2022
@AdamStaudt AdamStaudt changed the title Fix: lookup() closed too early, breaks sg rule creation in cluster sg if custom source sg is defined. fix: Call to lookup() closed too early, breaks sg rule creation in cluster sg if custom source sg is defined. Dec 6, 2022
Copy link
Member

@bryantbiggs bryantbiggs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you - looks like there was a bit more to iron out and I added some "test cases" to ensure the functionality works as intended

@bryantbiggs bryantbiggs merged commit 7bc4a27 into terraform-aws-modules:master Dec 6, 2022
antonbabenko pushed a commit that referenced this pull request Dec 6, 2022
### [19.0.1](v19.0.0...v19.0.1) (2022-12-06)

### Bug Fixes

* Call to lookup() closed too early, breaks sg rule creation in cluster sg if custom source sg is defined. ([#2319](#2319)) ([7bc4a27](7bc4a27))
@antonbabenko
Copy link
Member

This PR is included in version 19.0.1 🎉

spr-mweber3 pushed a commit to spring-media/terraform-aws-eks that referenced this pull request Jan 4, 2023
spr-mweber3 pushed a commit to spring-media/terraform-aws-eks that referenced this pull request Jan 4, 2023
### [19.0.1](terraform-aws-modules/terraform-aws-eks@v19.0.0...v19.0.1) (2022-12-06)

### Bug Fixes

* Call to lookup() closed too early, breaks sg rule creation in cluster sg if custom source sg is defined. ([terraform-aws-modules#2319](terraform-aws-modules#2319)) ([7bc4a27](terraform-aws-modules@7bc4a27))
@github-actions
Copy link

github-actions bot commented Jan 6, 2023

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants