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

Error Inconsistent conditional result types for aws_cloudwatch_event_target #23

Closed
katariax opened this issue Aug 19, 2021 · 2 comments
Closed

Comments

@katariax
Copy link
Contributor

Description

Using the example/complete, ran terraform plan in example/complete directory, and it failed with "Error: Inconsistent conditional result types"

Versions

  • Terraform: v1.0.5
  • Provider(s): aws 3.54.0
  • Module: terraform-aws-eventbridge

Reproduction

Steps to reproduce the behavior:
Using the code from master version as of Aug-19-2021:

  • clone repository
  • go to example/complete/
  • Run terraform init
  • Run terraform plan

Expected behavior

Terraform plan should be successful

Actual behavior

% terraform plan
╷
│ Error: Inconsistent conditional result types
│
│   on ../../main.tf line 49, in resource "aws_cloudwatch_event_target" "this":
│   49:   for_each = var.create && var.create_targets ? {
│   50:     for target in local.eventbridge_targets : target.name => target
│   51:   } : {}
│     ├────────────────
│     │ local.eventbridge_targets is tuple with 8 elements
│     │ var.create is true
│     │ var.create_targets is true
│
│ The true and false result expressions must have consistent types. The given expressions are object and object, respectively.

Additional context

Tried with terraform versions 1.0.4 and 0.12.4 and observed same behaviour

@svenlito
Copy link
Collaborator

closed via #24

Copy link

github-actions bot commented Mar 9, 2024

I'm going to lock this issue 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 similar to this, 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 Mar 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants