You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems it's still randomly happens. Not every time and seems like amount of diff decreased.
As I remember, before it was happening almost in 100% of runs and for every sns resource. Now for couple of them or so. For SNS it shows as usual changed order in policy.
Examples:
Note: Objects have changed outside of Terraform
Terraform detected the following changes made outside of Terraform since the
last "terraform apply" which may have affected this plan:# module.sns.aws_sns_topic.this["topic1"] has changed
~ resource"aws_sns_topic""this" {
...
~ policy=jsonencode(
~ {
~ Statement = [
~ {
~ Action = [
-"SNS:GetTopicAttributes",
+"SNS:Subscribe",
"SNS:SetTopicAttributes",
-"SNS:AddPermission",
"SNS:RemovePermission",
-"SNS:DeleteTopic",
-"SNS:Subscribe",
-"SNS:ListSubscriptionsByTopic",
+"SNS:Receive",
"SNS:Publish",
+"SNS:ListSubscriptionsByTopic",
+"SNS:GetTopicAttributes",
+"SNS:DeleteTopic",
+"SNS:AddPermission",
]
# (5 unchanged elements hidden)
},
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
YakDriver
changed the title
[Bug]: SNS Objects have changed outside of Terraform
[Bug]: sns/topic objects have changed outside of Terraform
Jan 19, 2023
I managed to create test config which reproduces my issues. It's not ideal in terms of code quality, since it's based on some legacy code.
So the issue with drift reproduces in ~95% of cases and always related to previously changed state. I.e. if previous state change was to add SNS, in next plan we'll get for this SNS Objects have changed outside of Terraform related to policy. If SQS was changed, we get Objects have changed outside of Terraform for that SQS related to policy as well.
Terraform 1.3.7
AWS provider 4.50.0.
It seems it's still randomly happens. Not every time and seems like amount of diff decreased.
As I remember, before it was happening almost in 100% of runs and for every sns resource. Now for couple of them or so. For SNS it shows as usual changed order in policy.
Examples:
References
The text was updated successfully, but these errors were encountered: