Skip to content

Instantly share code, notes, and snippets.

@concrete-cristian-trucco
Last active May 23, 2019 15:15
Show Gist options
  • Save concrete-cristian-trucco/6423e2e4cbf93fb7da5771dafd798015 to your computer and use it in GitHub Desktop.
Save concrete-cristian-trucco/6423e2e4cbf93fb7da5771dafd798015 to your computer and use it in GitHub Desktop.
Criação de uma EC2
# 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"
}
}
@concrete-cristian-trucco
Copy link
Author

criação do template para artigo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment