From 2f9e17c50a1075cb2df8eeb64dca74fefd712e55 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Sat, 9 Nov 2024 12:56:51 -0700 Subject: [PATCH 1/3] fix typo --- outputs.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/outputs.tf b/outputs.tf index 8ff0178..3c89d36 100644 --- a/outputs.tf +++ b/outputs.tf @@ -6,6 +6,7 @@ output "ubuntu_ami" { output "private_key" { value = tls_private_key.ssh_key.private_key_pem description = "SSH Private Key (PEM format)" + sensitive = true } output "public_key" { From 96b12f0d61021d0f2d5d7cacd753fe457e54b9e7 Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Sat, 9 Nov 2024 12:56:56 -0700 Subject: [PATCH 2/3] 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 From 4d5bf579f3f0320b2af1df66e5102e48eb1f5e3d Mon Sep 17 00:00:00 2001 From: Ryan Malloy Date: Sat, 9 Nov 2024 12:56:59 -0700 Subject: [PATCH 3/3] fix typo --- variables.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/variables.tf b/variables.tf index efe3bf9..4aa841a 100644 --- a/variables.tf +++ b/variables.tf @@ -44,9 +44,11 @@ variable "aws_region" { variable "aws_access_key" { description = "AWS Access Key" type = string + sensitive = true } variable "aws_secret_key" { description = "AWS Secret Key" type = string + sensitive = true }