-
Notifications
You must be signed in to change notification settings - Fork 100
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
Refactor outputs for 0.12, switch from maps to lists #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, let's switch to adding a new output to avoid breaking changes.
Refactored following yesterday's chat discussion: the map-style outputs are preserved, and new list-style outputs have been added. All tests pass (and they too were refactored to test both styles). |
Re ingwarr's suggestions to switch back to the legacy splat operator, this is the recommended best practice on the Terraform documentation:
|
@ludoo Ok, you are right, thank you |
I think you need to approve, since you requested changes ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Just two minor issues - want to confirm you're willing to make this a breaking change.
…samples Update auto-generated docs for changes in #9
This is one of the PRs we need for Fabric, that switch outputs in modules supporting multiple resources from maps to list. The rationale is to keep the same order passed in input variables (eg
names
here) for outputs, which lists do but maps don't as they reorder keys lexically. Having a different order in output vars tripped up ourselves and a few customers in the past.This also:
google_service_account
resources, since it's now possible with Terraform 0.12;formatlist
in 0.12 where the resulting list always has a nominal length of 1 and cannot e combined with other list of the same (effective) length, switching to using the newfor
construct is cleaner and works better.It's a backwards-incompatible change, so it needs a major version bump. Tests and example have been updated accordingly.