1
0
Fork 0
terraform-training/ex1/base.tf

19 lines
386 B
HCL

#QUESTION: Create the instance with name "inst2-studentid" passed in a variable
#####################
variable "instance-name" {
default = "inst2-cedric"
}
provider "aws" {
region = "eu-west-2"
}
resource "aws_instance" "inst2" {
ami = "ami-01a6e31ac994bbc09"
instance_type = "t2.micro"
key_name = "cedric"
tags = {
Name = "${var.instance-name}"
}
}