-
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
iam_role - continual changes on apply when inline_policy {} is defined #23336
Comments
I have also been impacted by this regression. There are no apply problems caused by the configuration, but the Previously discussed here: #22336 (comment) Terraform detected the following changes made outside of Terraform since the
last "terraform apply":
# aws_iam_role.role has changed
~ resource "aws_iam_role" "role" {
id = "repro"
name = "repro"
tags = {}
# (9 unchanged attributes hidden)
- inline_policy {}
# (1 unchanged block hidden)
}
# ...
Terraform will perform the following actions:
# aws_iam_role.role will be updated in-place
~ resource "aws_iam_role" "role" {
id = "repro"
name = "repro"
tags = {}
# (9 unchanged attributes hidden)
+ inline_policy {}
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy. |
Hi All - It appears this is till occurring on the latest provider (4.19.0). Is there any rough timeline on when this perpetual diff might be fixed? |
It appears this problem is resolved in 4.23.0. I'm guess this pull request might have fixed the issue: #23060 Since I can no longer recreate the issue on provider 4.23.0 - I'm going to close this issue. |
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. |
Community Note
Terraform CLI and Terraform AWS Provider Version
Terraform 1.1.2
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Expected Behavior
After upgrading from provider 3.69.0 to 3.74.3, no planned changes to existing IAM roles
Actual Behavior
Each subsequent apply tries to add a policy with a content of "" (and apparently succeeds - but no changes in AWS), but new plans/applies always show changes.
Steps to Reproduce
terraform apply
Important Factoids
Terraform AWS provider 3.69.0 does not exhibit this behavior.
Documenation states this is a valid configuration: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role#example-of-removing-inline-policies
References
The text was updated successfully, but these errors were encountered: