fix: Defaults the role_name coalesce to * to workaround import error #121
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Defaults the role_name to
*
within the coalesce to workaround #83. By setting a dummy value as the default option, terraform can successfully import without erroring out because the variables are empty and null. If one still forgot to set both values, an error will be thrown when attempting to create any of the IAM resources with the*
value.Motivation and Context
We still use terraform 0.12 and would like to upgrade to at least v1.29.0 at least up to v1.39.0. See #83 for details involving the current issue.
Breaking Changes
No breaking changes. If anyone is using v1.39.0, it is locked to terraform 0.13 anyways and it seems this bug is specific to 0.12. However, I wanted to put this out there in anticipation of potentially reverting the minimum version to 0.12.
How Has This Been Tested?
examples/*
projectsWhen using the versions of the module anywhere from
v1.29.0
tov1.38.0
, I attempted to import resources only to result in the error specified in #83. When changing the terraform file directly, (editing.terraform/modules/lambda/iam.tf
), the import then works. Commenting out the function name and role name being passed in results in the validate error above.