-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Extra/Unnecessary API Call on creating ec2 instance for cpu_credits #4897
Comments
The fix for this has been merged into master and will release with version 1.24.0 of the AWS provider, very shortly. |
This has been released in version 1.24.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
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. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Terraform Version
Community Note
Unnecessary modify instance of cpu_credits after launch a ec2 instance
I will provide a pull request.
Description
Our setup is that we do not have modify-instance privilege in aws. Looks like when we launching ec2-instance with cpu_credits = unlimited terraform do a unnecessary modify to set cpu_credits = unlimited againt after just launch it.
We get status code: 403 from AWS as we do not have modify instance priviliges.
Code change to not make the modify of instance after launch of instance
After getting status code: 403 we run terraform plan again and then we get
No changes. Infrastructure is up-to-date.
and that is correct as ec2-instance got the correct configuration of cpu_credit when we launch the instance.From debug logging we see this
Affected Resource(s)
Potential Terraform Configuration
The text was updated successfully, but these errors were encountered: