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

[remote-state] bugfix: Handle case where defaults is incompatible type #49

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

Nuru
Copy link
Contributor

@Nuru Nuru commented Jun 2, 2022

what

  • [remote-state] bugfix: Handle case where defaults is a Terraform type incompatible with the actual remote state outputs, leading Terraform to complain:
Error: Inconsistent conditional result types

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

why

  • bug fix

@Nuru Nuru added the bugfix Change that restores intended behavior label Jun 2, 2022
@Nuru Nuru requested a review from milldr June 2, 2022 23:08
@Nuru Nuru requested review from a team as code owners June 2, 2022 23:08
@Nuru Nuru requested a review from dotCipher June 2, 2022 23:08
@Nuru
Copy link
Contributor Author

Nuru commented Jun 2, 2022

/test all

@Nuru Nuru requested a review from aknysh June 2, 2022 23:11
@Nuru Nuru enabled auto-merge (squash) June 2, 2022 23:11
@milldr
Copy link
Member

milldr commented Jun 2, 2022

On the previous version 0.22.2 I had the following error:

│ Error: Inconsistent conditional result types
│
│   on .terraform-trmd/modules/eks/modules/remote-state/main.tf line 40, in locals:
│   40:   outputs                  = try(length(local.remote_state_backend_key), 0) > 0 ? local.remote_states[local.remote_state_backend_key][0].outputs : var.defaults
│     ├────────────────
│     │ local.remote_state_backend_key is "s3"
│     │ local.remote_states is object with 4 attributes
│     │ var.defaults is object with 1 attribute "eks_managed_node_workers_role_arns"
│
│ The true and false result expressions must have consistent types. The given expressions are object and object, respectively.

and now testing against this branch, the error is resolved!

@Nuru Nuru merged commit 325d23c into main Jun 2, 2022
@mergify mergify bot deleted the rs-defaults branch June 2, 2022 23:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Change that restores intended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants