From f1c486f840f7df3fe9276f10a81e46fa99381f9b Mon Sep 17 00:00:00 2001 From: smcgive <68348611+smcgive@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:40:39 -0700 Subject: [PATCH 1/3] Update main, vars and outputs --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 9b32ce0..0bfc354 100644 --- a/main.tf +++ b/main.tf @@ -16,7 +16,7 @@ data "aws_ami" "app_ami" { resource "aws_instance" "web" { ami = data.aws_ami.app_ami.id - instance_type = "t3.nano" + instance_type = var.instance_type tags = { Name = "HelloWorld" From 0561d2944b90d38676a808e467a84dcbc6bf8c2e Mon Sep 17 00:00:00 2001 From: smcgive <68348611+smcgive@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:41:15 -0700 Subject: [PATCH 2/3] Update variables.tf --- variables.tf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/variables.tf b/variables.tf index c750667..36cfe64 100644 --- a/variables.tf +++ b/variables.tf @@ -1,4 +1,4 @@ -#variable "instance_type" { -# description = "Type of EC2 instance to provision" -# default = "t3.nano" -#} +variable "instance_type" { + description = "Type of EC2 instance to provision" + default = "t3.micro" +} From 2c4bd4dff5e1282894e74b75593285613daa88a4 Mon Sep 17 00:00:00 2001 From: smcgive <68348611+smcgive@users.noreply.github.com> Date: Wed, 17 Jan 2024 12:41:34 -0700 Subject: [PATCH 3/3] Update outputs.tf --- outputs.tf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/outputs.tf b/outputs.tf index b35171b..c429b19 100644 --- a/outputs.tf +++ b/outputs.tf @@ -1,7 +1,7 @@ -#output "instance_ami" { -# value = aws_instance.web.ami -#} +output "instance_ami" { + value = aws_instance.web.ami +} -#output "instance_arn" { -# value = aws_instance.web.arn -#} +output "instance_arn" { + value = aws_instance.web.arn +}