-
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
* aws_instance.instance: unexpected EOF #6532
Comments
It could be related to your |
all my module calls the userdata that way, I think I find the root cause, I change the provider version from 1.46. to 1.4.0 and my code works |
well it's not the provider version either, the crash is because of the credit_specification , I launch a T3 instance and I didn't set the value for cpu_credit. |
Hi @jbanmene are you still having issues here? There's been a number of changes to the If your issue has been resolved please close this issue; adding any relevant information as a comment. Cheers! |
Fixes: #6532 When given an empty credit_specification block (i.e cpu_credits is missing) the Terraform provider will crash upon trying to type assert on the empty (nil) block. This check introduces a guard clause around the type assertion to protect around the empty (nil) block. A warning is logged to indicated that a default value will be used in place of the missing value. Acceptance tests after changes ``` --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 ```
Fixes: #6532 When given an empty credit_specification block (i.e cpu_credits is missing) the Terraform provider will crash upon trying to type assert on the empty (nil) block. This check introduces a guard clause around the type assertion to protect around the empty (nil) block. A warning is logged to indicated that a default value will be used in place of the missing value. Acceptance tests after changes ``` --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 ```
Fixes: #6532 When given an empty credit_specification block (i.e cpu_credits is missing) the Terraform provider will crash upon trying to type assert on the empty (nil) block. This check introduces a guard clause around the type assertion to protect around the empty (nil) block. A warning is logged to indicated that a default value will be used in place of the missing value. Acceptance tests after changes ``` --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 ```
…#9003) Fixes: #6532 When given an empty credit_specification block (i.e cpu_credits is missing) the Terraform provider will crash upon trying to type assert on the empty (nil) block. This check introduces a guard clause around the type assertion to protect around the empty (nil) block. A warning is logged to indicated that a default value will be used in place of the missing value. Acceptance tests after changes ``` --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t2 --- PASS: TestAccAWSInstance_creditSpecification_unknownCpuCredits_t3 ```
This has been released in version 2.16.0 of the Terraform 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
Hi there,
when i'm trying to launch a new instance,my terraform failed with error:
A part of my config related to my instance below
Terraform Version
Terraform v0.11.10
Affected Resource(s)
Terraform Configuration Files
my instance module
Debug Output
Panic Output
https://gist.github.com/jbanmene/642f5d8edecbd2abd6f50c92751aec6f
Expected Behavior
create an instance
Actual Behavior
Terraform crashes
Steps to Reproduce
terraform apply
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: