From 96b12f0d61021d0f2d5d7cacd753fe457e54b9e7 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Sat, 9 Nov 2024 12:56:56 -0700 Subject: [PATCH] fix typo --- main.tf | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/main.tf b/main.tf index bae8bf2..4c43b9e 100644 --- a/main.tf +++ b/main.tf @@ -122,23 +122,24 @@ data "aws_ami" "latest_ecs" { } data "aws_ami" "ubuntu" { - most_recent = true - owners = ["099720109477"] # Cannonical / Ubuntu + most_recent = true + owners = ["099720109477"] - filter { - name = "name" - values = ["ubuntu/images/hvm-ssd/ubuntu-focal-24.04-amd64-server-*"] - } - - filter { - name = "virtualization-type" - values = ["hvm"] - } + # Ubuntu AMI ID search + filter { + name = "name" + values = ["ubuntu/images/hvm-ssd-gp3/ubuntu-noble-24.04-amd64-server-*"] + } + filter { + name = "virtualization-type" + values = ["hvm"] + } } resource "aws_instance" "ubuntu_instance" { - ami = data.aws_ami.ubuntu.ami # Ubuntu "ami-0a0e5d9c7acc336f1" + ami = data.aws_ami.ubuntu.id + # Ubuntu "ami-0a0e5d9c7acc336f1" # ami = data.aws_ami.latest_ecs.ami # Amazon Linux instance_type = var.instance_size subnet_id = aws_subnet.public_subnet.id