-
Notifications
You must be signed in to change notification settings - Fork 0
/
aws.tf
38 lines (34 loc) · 971 Bytes
/
aws.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
###########################
# AWS Networking goodness #
###########################
# VPC
resource "aws_vpc" "andromeda" {
cidr_block = "10.222.0.0/16"
tags { Name = "Andromeda" }
}
# Gateway
resource "aws_internet_gateway" "wormhole" {
vpc_id = "${aws_vpc.andromeda.id}"
tags { Name = "Andromeda's Wormhole" }
}
# Route table
resource "aws_route_table" "compass" {
vpc_id = "${aws_vpc.andromeda.id}"
route {
cidr_block = "0.0.0.0/0"
gateway_id = "${aws_internet_gateway.wormhole.id}"
}
tags { Name = "Andromeda's Compass" }
}
# Subnets
resource "aws_subnet" "andromeda-subzero" {
vpc_id = "${aws_vpc.andromeda.id}"
cidr_block = "10.222.0.0/24"
map_public_ip_on_launch = true
tags { Name = "Andromeda's SubZero" }
}
# Route associatios
resource "aws_route_table_association" "compass-subzero" {
subnet_id = "${aws_subnet.andromeda-subzero.id}"
route_table_id = "${aws_route_table.compass.id}"
}