Skip to content

Instantly share code, notes, and snippets.

@Kotauror
Created October 31, 2018 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kotauror/6a34bffec3ee4f1b32afde372ab15668 to your computer and use it in GitHub Desktop.
Save Kotauror/6a34bffec3ee4f1b32afde372ab15668 to your computer and use it in GitHub Desktop.
aws.tf
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 justynazygmunt@Sams-Air.localdomain"
}
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