-
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 is not updating iam policy for SQS #13759
Comments
Hi @kydas 👋 Thank you for raising this. Are you still having this issue? If so, we will require additional information to help troubleshoot, such as the previous configuration, the new configuration, and shown plan output. |
Hi @bflad, I may have run into the same issue. My previous config:
Resulting policy:
Updated config:
The plan showed no changes from this config change, so the resulting policy didn't change. I'm using Terraform 0.12.24 and AWS provider 2.70.0. I got around it by |
I think we are seeing the same issue as well with Terraform 0.12.29. |
The same with :
|
In #19639 I have modified the |
This functionality has been released in v3.45.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. |
I updated an AWS IAM policy for an SQS queue but the terraform apply shows no changes to the policy. In the state file I see:
"primary": { "id": "##########", "attributes": { "id": "########", "json": "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"Sid#########\",\n \"Effect\": \"Allow\",\n \"Action\": \"SQS:*\",\n \"Resource\": \"arn:aws:sqs:###########\",\n \"Principal\": \"*\,\n \"Condition\": {\n \"StringEquals\": {\n \"aws:SourceArn\": \"arn:aws:sns:###########\"\n }\n }\n }\n ]\n}"
The change was adding in the Principal parameter. What I see on AWS is:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "Sid##########", "Effect": "Allow", "Action": "SQS:*", "Resource": "arn:aws:sqs:############", "Condition": { "StringEquals": { "aws:SourceArn": "arn:aws:sns:##############" } } } ] }
You can see that the principle parameter is not in the AWS document, despite being in the terraform files and in the state file. Terraform should refresh the statefile to match the resource, and then apply the change based on the configuration in the terraform files.
Versions:
Terraform: 11.11
AWS Plugin: 2.66
The text was updated successfully, but these errors were encountered: