wardviaene / terraform-course

Course files for my Udemy course about Terraform

Home Page:https://www.udemy.com/learn-devops-infrastructure-automation-with-terraform/?couponCode=TERRAFORM_GIT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to launch EC2 instance

KritiS opened this issue · comments

Trying to create the ec2 instance following the steps in Udemy course.

install.tf

provider "aws" {
  access_key = ""
  secret_key = ""
  region     = "us-east-2"
}

resource "aws_instance" "example" {
  ami           = "ami-0bb2a062146998209"
  instance_type = "t2.micro"
}

Getting below error -

Error: Error launching source instance: Unsupported: The requested configuration is currently not supported. Please check the documentation for supported configurations.
	status code: 400, request id: 9115509c-2381-465c-b279-f2c409b65dc1

  on instance.tf line 7, in resource "aws_instance" "example":
   7: resource "aws_instance" "example" {

Using https://cloud-images.ubuntu.com/locator/ec2/ to get the AMI ID

ami-0bb2a062146998209 is ARM based, which is a different architecture. You need amd64, for example: ami-08cec7c429219e339