When working with Terraform AWS, if you create an EC2 server and later change its size but make a typographical error, for example, entering "t3.smalle" instead of "t3.small", Terraform does not show an error during the plan phase. However, when you apply the changes, it stops the server and then displays the following error:
│ Error: updating EC2 Instance (i-086443bd9d265611b) type: modifying EC2 Instance (i-086443bd9d265611b) InstanceType (t3.smalle) attribute: InvalidParameterValue: The following supplied instance types do not exist: [t3.smalle]
The server remains in a stopped state, and even if you revert to the correct size it had before and apply the changes again, the server continues to stay stopped.
The only way to make terraform to start the server again, is to put another size that exist, not the previous working one, but some another (new).
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
v1.8.5
AWS Provider Version
v5.52.0
Affected Resource(s)
aws_instance
Expected Behavior
It should revert and Start the server on "Running" state
Actual Behavior
Right now, even if you remove the typo and add the previous working size, the server do not start, its remaining "stopped"
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
When working with Terraform AWS, if you create an EC2 server and later change its size but make a typographical error, for example, entering "t3.smalle" instead of "t3.small", Terraform does not show an error during the plan phase. However, when you apply the changes, it stops the server and then displays the following error:
The server remains in a stopped state, and even if you revert to the correct size it had before and apply the changes again, the server continues to stay stopped. The only way to make terraform to start the server again, is to put another size that exist, not the previous working one, but some another (new).
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No