[Bug]: Setting override_policy_documents = [""]
in aws_iam_policy_document
causes crash
#27022
Labels
bug
Addresses a defect in current functionality.
crash
Results from or addresses a Terraform crash or kernel panic.
service/iam
Issues and PRs that pertain to the iam service.
service/s3
Issues and PRs that pertain to the s3 service.
Milestone
Terraform Core Version
1.2.8
AWS Provider Version
4.32
Affected Resource(s)
Expected Behavior
I created a policy document that looked like this:
This is incorrect on my part, I should have set
override_policy_documents = null
(in my code the value is determined by a ternary operator, so I couldn't leaveoverride_policy_documents
out completely).I would expect this to throw a meaningful error along the lines of "invalid IAM policy supplied" or "empty IAM policy supplied".
Actual Behavior
The provider crashes entirely when
terraform plan
is executed, with an error message that is not very helpful.All resources return errors that say either "Plugin did not respond" or "Request cancelled".
The only change needed to trigger this behaviour is to set
override_policy_documents = [""]
.Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Set
override_policy_documents = [""]
in an IAM policy document and runterraform plan
. The policy in question is already deployed, and is attached to an S3 bucket.Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No response
The text was updated successfully, but these errors were encountered: