Last active
March 28, 2019 01:21
-
-
Save Ayush-Singhal28/a0405f0957053b26addcea102019b4fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = 2 | |
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