-
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
Terraform panic: interface conversion: interface {} is []interface {}, not string #10528
Comments
@SarahRiley Can you please paste an example of the IAM policy (sanitized where necessary of cource) on the config recorder that is causing this panic. |
Certainly, here is the relevant code:
|
Submitted upstream PR jen20/awspolicyequivalence#9 to fix the panic, but this won't fix the underlying issue and will probably result in a run time |
Interesting. Where’s the problem in the policy, if you don’t mind? This was upgraded from 0.11 code originally, where it was valid. |
OK, I've narrowed down the problem to this:
Removing the outer []s for local.scanned_account_id_list fixed it. |
@SarahRiley Thanks for diving into this. The list-in-a-list was the same error as in #10135 but we should still get the the PR to stop the panic merged. |
Agreed. Thanks! |
This brings in the fix from @ewbankkit for a panic in the case of an incorrect type assertion against nil. Fixes #10135. Fixes #10528.
The fix for this has been merged and will release with version 2.42.0 of the Terraform AWS Provider, likely next week. 👍 |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
This has been released in version 2.42.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 for triage. Thanks! |
Community Note
Terraform Version
0.12.10
Affected Resource(s)
We also see this in:
(i can go back and get this trace if you need it)
Terraform Configuration Files
Panic Output
https://gist.github.com/SarahRiley/9cf34603de6daea93ce20bc13a703c66
Expected Behavior
A plan
Actual Behavior
A crash
Steps to Reproduce
terraform apply
The text was updated successfully, but these errors were encountered: