Skip to content

Commit cabece5

Browse files
Adds only VPC resource (#92)
* Adds only VPC resource * Adds tags for VPC
1 parent e9abb3d commit cabece5

File tree

5 files changed

+46
-42
lines changed

5 files changed

+46
-42
lines changed

src/aws/elastic_ip.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
resource "aws_eip" "gambley_nat_eip" {}
1+
# resource "aws_eip" "gambley_nat_eip" {}

src/aws/gateways.tf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
resource "aws_internet_gateway" "gambley_internet_gateway" {
2-
vpc_id = aws_vpc.gambley_vpc.id
3-
}
1+
# resource "aws_internet_gateway" "gambley_internet_gateway" {
2+
# vpc_id = aws_vpc.gambley_vpc.id
3+
# }
44

5-
resource "aws_nat_gateway" "gambley_nat_gateway" {
6-
allocation_id = aws_eip.gambley_nat_eip.id
7-
subnet_id = aws_subnet.gambley_subnet_public.id
8-
}
5+
# resource "aws_nat_gateway" "gambley_nat_gateway" {
6+
# allocation_id = aws_eip.gambley_nat_eip.id
7+
# subnet_id = aws_subnet.gambley_subnet_public.id
8+
# }

src/aws/route_tables.tf

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
resource "aws_route_table" "gambley_private_route_table" {
2-
vpc_id = aws_vpc.gambley_vpc.id
3-
route {
4-
cidr_block = "0.0.0.0/0"
5-
gateway_id = aws_nat_gateway.gambley_nat_gateway.id
6-
}
7-
}
1+
# resource "aws_route_table" "gambley_private_route_table" {
2+
# vpc_id = aws_vpc.gambley_vpc.id
3+
# route {
4+
# cidr_block = "0.0.0.0/0"
5+
# gateway_id = aws_nat_gateway.gambley_nat_gateway.id
6+
# }
7+
# }
88

9-
resource "aws_route_table" "gambley_public_route_table" {
10-
vpc_id = aws_vpc.gambley_vpc.id
11-
route {
12-
cidr_block = "0.0.0.0/0"
13-
gateway_id = aws_internet_gateway.gambley_internet_gateway.id
14-
}
15-
}
9+
# resource "aws_route_table" "gambley_public_route_table" {
10+
# vpc_id = aws_vpc.gambley_vpc.id
11+
# route {
12+
# cidr_block = "0.0.0.0/0"
13+
# gateway_id = aws_internet_gateway.gambley_internet_gateway.id
14+
# }
15+
# }
1616

17-
resource "aws_route_table_association" "gambley_private_route_table_association" {
18-
subnet_id = aws_subnet.gambley_subnet_private.id
19-
route_table_id = aws_route_table.gambley_private_route_table.id
20-
}
17+
# resource "aws_route_table_association" "gambley_private_route_table_association" {
18+
# subnet_id = aws_subnet.gambley_subnet_private.id
19+
# route_table_id = aws_route_table.gambley_private_route_table.id
20+
# }
2121

22-
resource "aws_route_table_association" "gambley_public_route_table_association" {
23-
subnet_id = aws_subnet.gambley_subnet_public.id
24-
route_table_id = aws_route_table.gambley_public_route_table.id
25-
}
22+
# resource "aws_route_table_association" "gambley_public_route_table_association" {
23+
# subnet_id = aws_subnet.gambley_subnet_public.id
24+
# route_table_id = aws_route_table.gambley_public_route_table.id
25+
# }

src/aws/subnet.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
resource "aws_subnet" "gambley_subnet_private" {
2-
vpc_id = aws_vpc.gambley_vpc.id
3-
cidr_block = "10.0.1.0/24"
4-
availability_zone = "ap-south-1a"
5-
map_public_ip_on_launch = "false"
6-
}
1+
# resource "aws_subnet" "gambley_subnet_private" {
2+
# vpc_id = aws_vpc.gambley_vpc.id
3+
# cidr_block = "10.0.1.0/24"
4+
# availability_zone = "ap-south-1a"
5+
# map_public_ip_on_launch = "false"
6+
# }
77

8-
resource "aws_subnet" "gambley_subnet_public" {
9-
vpc_id = aws_vpc.gambley_vpc.id
10-
cidr_block = "10.0.2.0/24"
11-
availability_zone = "ap-south-1a"
12-
map_public_ip_on_launch = "true"
13-
}
8+
# resource "aws_subnet" "gambley_subnet_public" {
9+
# vpc_id = aws_vpc.gambley_vpc.id
10+
# cidr_block = "10.0.2.0/24"
11+
# availability_zone = "ap-south-1a"
12+
# map_public_ip_on_launch = "true"
13+
# }

src/aws/vpc.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
resource "aws_vpc" "gambley_vpc" {
22
cidr_block = "10.0.0.0/16"
3+
tags = {
4+
"Name" = "Gambley VPC"
5+
"Terraform" = "True"
6+
}
37
}

0 commit comments

Comments
 (0)