-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Value Conversion Error with aws_iam_role_policy_attachments_exclusive
and null
values for policy_arns
#39786
Comments
Community NoteVoting for Prioritization
Volunteering to Work on This Issue
|
Why not conditionally remove the null value with a for statement? |
I realize this may be unclear from my original issue - there are workarounds to achieve my desired behavior, such as my But the error I received from Terraform explicitly said:
And I figured if I didn't report it now, someone else would find it eventually. So I opened an issue. |
Hey @matthewbarreiro 👋 Thank you for taking the time to raise this! While I agree that there are definitely workarounds (outside of previous suggestions, |
Is anyone working on this issue? I want to try fixing it cc @justinretzolk |
Warning This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
This functionality has been released in v5.76.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
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. |
Terraform Core Version
1.9.8
AWS Provider Version
v5.72.0
Affected Resource(s)
aws_iam_role_policy_attachments_exclusive
Expected Behavior
If the
policy_arns
field should supportnull
values (e.g. for use-cases such as this), then:null
should be removed / handled / ignored at applyOtherwise:
Actual Behavior
I get a
Value Conversion Error
onterraform apply
.Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Run
terraform init && terraform apply
Debug Output
Full debug output: debug_output.md
Output with Debug Logging Disabled:
Panic Output
No response
Important Factoids
It's possible this isn't supposed to work like this at all, though I still feel like the value conversion error should be handled regardless.
Side note: using
""
instead ofnull
for the right side of the conditional does not work either.However the AWS SDK returns an error for this case:
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: