Terraform – EC2 t2 micro in easy steps
1. Create the following file with name something like aws.tr
provider “aws” {
access_key = “Your Access Key here”
secret_key = “Your Secret key here”
region = “your region preferred”
}
access_key = “Your Access Key here”
secret_key = “Your Secret key here”
region = “your region preferred”
}
resource “aws_instance” “terraform” {
ami = “your ami id here”
instance_type = “t2.micro”
}
ami = “your ami id here”
instance_type = “t2.micro”
}
run a ‘terraform apply’
Done !