Last active
May 23, 2019 15:15
-
-
Save concrete-cristian-trucco/6423e2e4cbf93fb7da5771dafd798015 to your computer and use it in GitHub Desktop.
Criação de uma EC2
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
# t2.micro node with an AWS Tag naming it "HelloWorld" | |
provider "aws" { | |
region = "us-west-2" | |
} | |
data "aws_ami" "ubuntu" { | |
most_recent = true | |
filter { | |
name = "name" | |
values = ["ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*"] | |
} | |
filter { | |
name = "virtualization-type" | |
values = ["hvm"] | |
} | |
owners = ["099720109477"] # Canonical | |
} | |
resource "aws_instance" "web" { | |
ami = "${data.aws_ami.ubuntu.id}" | |
instance_type = "t2.micro" | |
tags = { | |
Name = "HelloWorld" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
criação do template para artigo