-
-
Notifications
You must be signed in to change notification settings - Fork 89
fix: The false result value has the wrong type #27
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
Conversation
TF condition cannot accept different map structures from the left and right results of the condition. var.service_integrations expected to be dynamic
This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days
Remove stale label
Fixed in #30.
Thank you very much!
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
Whenever you define your
service_integrations
and setcreate_role
&&attach_policies_for_integrations
to false, you expect to have an empty map to skip the appropriate blocks and resources to be created within the module.Therefore Terraform will throw an exception for not accepting different map structure within the same condition. The first one with your key/values you are providing and the second one is an empty map.
When executing
terraform plan
the below error appears:Used variables in order to reproduce it.
Motivation and Context
This change keeps the same logic behind the conditions and resources creation, it's simply a different way of using values and condition with the for_each.
With this solution we create our map whenever we have values, and it skips the block when the condition is not met.
Breaking Changes
There no really breaking changes