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

Change for_each to avoid nested maps typing_error #22

Merged
merged 1 commit into from Oct 26, 2021

Conversation

nate-selzer
Copy link
Contributor

@nate-selzer nate-selzer commented Oct 26, 2021

what

  • Fix conditional operator

why

  • Prevent terraform errors like
Error: Inconsistent conditional result types

  on .terraform/modules/opsgenie_config/modules/config/integration_actions.tf line 2, in resource "opsgenie_integration_action" "this":
   2:   for_each = module.this.enabled ? { for integration_action in local.integration_actions : integration_action.name => integration_action } : {}
    |----------------
    | local.integration_actions is tuple with 14 elements
    | module.this.enabled is true

The true and false result expressions must have consistent types. The given
expressions are object and object, respectively.

references

@nate-selzer nate-selzer requested review from a team as code owners October 26, 2021 23:13
@Benbentwo
Copy link
Member

/test all

@Benbentwo Benbentwo added the patch A minor, backward compatible change label Oct 26, 2021
@aknysh aknysh merged commit 48b9f1b into cloudposse:master Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch A minor, backward compatible change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants