devops-box icon indicating copy to clipboard operation
devops-box copied to clipboard

When run terraform apply following errors are occured

Open AdnanLatif opened this issue 6 years ago • 1 comments

Error: Error applying plan:

1 error(s) occurred:

  • aws_instance.example: 1 error(s) occurred:

  • aws_instance.example: Error launching source instance: InvalidParameterCombina tion: Virtualization type 'hvm' is required for instances of type 't2.micro'. En sure that you are using an AMI with virtualization type 'hvm'. For more informat ion, see http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types .html status code: 400, request id: e5d3c3dc-eaaa-4131-aadf-850069169b07

Terraform does not automatically rollback in the face of errors. Instead, your Terraform state file has been partially updated with any resources that successfully completed. Please address the error above and apply again to incrementally change your infrastructure.

AdnanLatif avatar Apr 10 '18 21:04 AdnanLatif

This error seems to be more relevant for your use case of terraform and AWS EC2. Read more about Virtualization types and EC2 instances, the following links may help you with this issue.

https://aws.amazon.com/amazon-linux-ami/instance-type-matrix/ https://www.terraform.io/docs/providers/aws/r/ami.html

hemi-hga avatar Jul 02 '18 06:07 hemi-hga