1

I have this Terraform file -

terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.23" } } required_version = ">= 1.2.0" } provider "aws" { region = "us-west-2" } resource "aws_instance" "app_server" { ami = "ami-830c94e3" instance_type = "t3.nano" } 

When I run terraform init && terraform apply I get this error:

╷ │ Error: creating EC2 Instance: InvalidParameterCombination: Enhanced networking with the Elastic Network Adapter (ENA) is required for the 't3.nano' instance type. Ensure that you are using an AMI that is enabled for ENA. │ status code: 400, request id: 1d85ba43-ffde-4840-9acb-8ac87c13fb24 │ │ with aws_instance.app_server, │ on main.tf line 16, in resource "aws_instance" "app_server": │ 16: resource "aws_instance" "app_server" { │ ╵ 

Two questions:

  1. What AWS CLI command or what steps on AWS Console can I perform to find out the instance types that do not require ENA?

  2. What AWS CLI command or what steps on AWS Console can I perform to find out the AMIs that support ENA?

1 Answer 1

0

aws ec2 describe-instance-types --filters Name=network-info.ena-support,Values=supported,unsupported

may be more succinct to add --query 'InstanceTypes[].InstanceType'

You'll need to cross reference those with what is available in the region

aws ec2 describe-instance-type-offerings --location-type region --filters Name=location,Values=region

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.