-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
aws_iot_policy.X: VersionsLimitExceededException: The policy X already has the maximum number of versions (5) #9540
Comments
I've started work on a pull request and I'll create a WIP later today. |
Hi @jeandek thanks for taking the lead on this. Please feel free to reach out if you find you need help. |
Thanks @nywilken! I think I've managed on my own, but my new acceptance test takes quite a while to run. This might be normal because there are quite a few steps, but feel free to have a look at my pull request if you have the spare time. |
I hit a bug related to this issue. When you get the 409, terraform assumes that the policy has changed and update its internal state. So if you try to apply again, it will not detect a diff. |
@Sytten : I think your problem probably deserves its own issue. While my PR would prevent it from occurring, the root cause is very different since it's related to how/what Terraform records in its resource graph. |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. 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. |
Community Note
Terraform Version
Terraform v0.11.14
provider.aws v2.21.1
Affected Resource(s)
Terraform Configuration Files
Output
Expected Behavior
I would expect the same behaviour as with aws_iam_policy. The oldest non-default policy version should be deleted to make room for the new one.
Steps to Reproduce
Just copy and paste the TF configuration I posted above and run
terraform apply
six times. (You can change the topic number, for instance.)References
The text was updated successfully, but these errors were encountered: