Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "us-west-2"
}
terraform {
backend "s3" {
bucket = "terraform-remote-state"
key = "terraform/dev/terraform.tfstate"
region = "us-east-1"
}
}
resource "aws_instance" "aws-instance" {
count = 1
ami = "ami-a0cfeed8"
instance_type ="t2.micro"
key_name = "${var.key_name}"
connection {
user = "ec2-user"
private_key = "${file(var.private_key_path)}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment