-
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
credit specification is updated after no changes in the code #5654
Comments
According to the T3 instance product documentation:
I believe we default the If you would like to continue to not configure the instance resource "aws_instance" "example" {
# ... other configuration ...
lifecycle {
ignore_changes = ["credit_specification.0.cpu_credits"]
}
} |
Ignore the credit_specification, we can't optionally specify this (for `m` type instances, and t3 helpfully defaults to unlimited), more details: hashicorp/terraform-provider-aws#5654
This issue seems related to mine:
I can provide the full diff on request but I'll have to clean it up. This occurs when changing the user_data on an aws_instance with instance_type = t3.medium
|
Tried the |
I've encountered this with @Jonathan-7 As my workaround I've decided to lock the resource "aws_instance" "example" {
# ...
credit_specification = {
cpu_credits = "unlimited"
}
} So this is quite similar to |
@kmotrebski your workaround should be fine. I expect them to have the credits as unlimited by default in an upcoming release. |
@bflad I will work on this issue. |
not sure if its relevant but I set
explicitly in code.... but Terraform still builds t3 instances with t.unlimited enabled. Only a second apply then corrects the credit specification probably related and would be nice to have fixed |
The fix for this has been merged into master for the |
This has been released in version 1.37.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! |
Community Note
Hello,
I ran into this a couple of times today while trying out the t3.micro instances. Even if I didn't change anything or I changed an unrelated resource (e.g the security group name) it would still update the credit specification.
Terraform Version
Terraform v0.11.8
Affected Resource(s)
Terraform Configuration Files
Debug Output
https://gist.github.com/Jonathan-7/6c33ec9315158eeb1e4278132e2ced1d
Panic Output
Expected Behavior
Don't update anything.
Actual Behavior
Changed credit specification:
Terraform will perform the following actions:
~ aws_instance.example
credit_specification.0.cpu_credits: "unlimited" => "standard"
Steps to Reproduce
run terraform apply twice
terraform apply
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: