Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +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"
}
Expand Down
12 changes: 6 additions & 6 deletions outputs.tf
Original file line number Diff line number Diff line change
@@ -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
}
8 changes: 4 additions & 4 deletions variables.tf
Original file line number Diff line number Diff line change
@@ -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.nano"
}