Created
May 13, 2019 02:57
-
-
Save mschirbel/5c631c340be799cd5571b883e431f106 to your computer and use it in GitHub Desktop.
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
resource "aws_instance" "nat" { | |
ami = "ami-0669a96e355eac82f" | |
availability_zone = "sa-east-1a" | |
instance_type = "m1.small" | |
key_name = "${var.aws_key_name}" | |
vpc_security_group_ids = ["${aws_security_group.nat.id}"] | |
subnet_id = "${aws_subnet.sa-east-1a-public.id}" | |
associate_public_ip_address = true | |
source_dest_check = false | |
tags { | |
Name = "VPC NAT" | |
} | |
} | |
resource "aws_instance" "web-1" { | |
ami = "${lookup(var.amis, var.aws_region)}" | |
availability_zone = "sa-east-1a" | |
instance_type = "m1.small" | |
key_name = "${var.aws_key_name}" | |
vpc_security_group_ids = ["${aws_security_group.web.id}"] | |
subnet_id = "${aws_subnet.sa-east-1a-public.id}" | |
associate_public_ip_address = true | |
source_dest_check = false | |
tags { | |
Name = "Web Server 1" | |
} | |
} | |
resource "aws_instance" "db-1" { | |
ami = "${lookup(var.amis, var.aws_region)}" | |
availability_zone = "sa-east-1a" | |
instance_type = "m1.small" | |
key_name = "${var.aws_key_name}" | |
vpc_security_group_ids = ["${aws_security_group.db.id}"] | |
subnet_id = "${aws_subnet.sa-east-1a-private.id}" | |
source_dest_check = false | |
tags { | |
Name = "DB Server 1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment