Created
March 20, 2019 04:47
-
-
Save concrete-cristian-trucco/f137b03e1a6413b0db1530587314e1aa to your computer and use it in GitHub Desktop.
exemplo usado no artigo do Medium AWS Recorder
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
# https://www.terraform.io/downloads.html | |
provider "aws" { | |
region = "us-east-1" | |
} | |
resource "aws_security_group" "ec24a93e67" { | |
description = "launch-wizard-1 created 2019-03-19T23:42:03.009-03:00" | |
name = "launch-wizard-1" | |
vpc_id = "vpc-0dd309e6e0da526ed" | |
} | |
resource "aws_network_interface" "ec2dae2bc8" { | |
subnet_id = "subnet-0cae8db2d26538e75" | |
description = "Primary network interface" | |
security_groups = [ | |
"sg-0c2e60cd1707137ab" | |
] | |
} | |
resource "aws_instance" "ec2d588950" { | |
ami = "ami-0de53d8956e8dcf80" | |
key_name = "teste-19-03-19" | |
instance_type = "t2.micro" | |
tenancy = "default" | |
monitoring = false | |
disable_api_termination = false | |
instance_initiated_shutdown_behavior = "stop" | |
credit_specification { | |
cpu_credits = "standard" | |
} | |
tags { | |
application = "dev" | |
} | |
ebs_optimized = false | |
root_block_device { | |
volume_type = "gp2" | |
volume_size = 8 | |
} | |
ebs_block_device { | |
device_name = "/dev/sdb" | |
volume_type = "gp2" | |
volume_size = 20 | |
delete_on_termination = false | |
} | |
network_interface { | |
device_index = 0 | |
network_interface_id = "${aws_network_interface.ec28699a39.id}" | |
delete_on_termination = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment