vim var.tf
provider "aws" {
region = "us-east-1"
access_key = "AKIGQ"
secret_key = "KfU0tFVkt1aurid"
}
resource "aws_instance" "new" {
ami = var.image
instance_type = var.instancetype
tags = {
Name = "new"
}
}
resource "aws_instance" "old" {
ami = var.image
instance_type = var.instancetype
tags = {
Name = "old"
}
}
vim variables.tf
variable "instancetype" {
}
variable "image" {
}
values.auto.tfvar
instancetype="t2.nano"
image="ami-02e136e904f3da870"
Comments
Post a Comment