Created
October 31, 2018 13:21
-
-
Save Kotauror/6a34bffec3ee4f1b32afde372ab15668 to your computer and use it in GitHub Desktop.
aws.tf
This file contains hidden or 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
variable "AWS_ACCESS_KEY" {} | |
variable "AWS_SECRET_KEY" {} | |
provider "aws" { | |
region = "us-east-1" | |
access_key = "${var.AWS_ACCESS_KEY}" | |
secret_key = "${var.AWS_SECRET_KEY}" | |
} | |
resource "aws_key_pair" "justyna-key" { | |
key_name = "justyna-key" | |
public_key = "ssh-rsa LONG-PASSWORD [email protected]" | |
} | |
resource "aws_instance" "web" { | |
ami = "ami-0922553b7b0369273" | |
instance_type = "t2.micro" | |
key_name = "${aws_key_pair.justyna-key.key_name}" | |
tags { | |
Name = "HelloJusia" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment