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: lifecycle_rule optional condition is_live failing when missing #246

Conversation

antoinedeschenes
Copy link
Contributor

As of the latest terraform version (1.4.6), the module fails when the optional "is_live" condition is missing, with the following error message:

Invalid value for "default" parameter: the default value must have the same type as the map elements.

│ Error: Invalid function argument
│ 
│   on main.tf line 81, in resource "google_storage_bucket" "bucket":
│   81:         with_state                 = lookup(lifecycle_rule.value.condition, "with_state", lookup(lifecycle_rule.value.condition, "is_live", false) ? "LIVE" : null)
│ 
│ Invalid value for "default" parameter: the default value must have the same
│ type as the map elements.

@antoinedeschenes antoinedeschenes requested a review from a team as a code owner May 12, 2023 18:33
@google-cla
Copy link

google-cla bot commented May 12, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

As of the latest terraform version (1.4.6), the module fails when the
optional "is_live" condition is missing, with the following error
message:
Invalid value for "default" parameter: the default value must have the same type as the map elements.

Signed-off-by: Antoine Deschênes <antoine.deschenes@linux.com>
@apeabody
Copy link
Contributor

apeabody commented Jul 5, 2023

/gcbrun

@apeabody
Copy link
Contributor

apeabody commented Jul 5, 2023

/gcbrun

Copy link
Contributor

@apeabody apeabody left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @antoinedeschenes!

@apeabody apeabody merged commit c8111a4 into terraform-google-modules:master Jul 5, 2023
4 checks passed
@antoinedeschenes antoinedeschenes deleted the fix/missing-is_live-failure branch July 27, 2023 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants