devops-box
devops-box copied to clipboard
When run terraform apply following errors are occured
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.
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