!+ Creating infra points for internet access on Crete subnet
With this patch members of the Crete subnet will be able to properly access the outside world which is required for these services to function as intended.
This commit is contained in:
1 parent
86df303630
commit
8b1d576bfb
3 files changed
+31
No files matched your search
@@ -0,0 +1,9 @@
|
||||
# Beta will basically always be the static web server
|
||||
# hence why we explicitly setup an EIP for it alone like this
|
||||
resource "aws_eip" "beta_eip" {
|
||||
instance = aws_instance.beta.id
|
||||
vpc = true
|
||||
tags = {
|
||||
Name = "Beta Elastic IP"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
resource "aws_internet_gateway" "athens_gateway" {
|
||||
vpc_id = aws_vpc.athens_vpc.id
|
||||
|
||||
tags = {
|
||||
Name = "Athens Common Internet Gateway"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
resource "aws_route_table" "crete_route_table" {
|
||||
vpc_id = aws_vpc.athens_vpc.id
|
||||
route {
|
||||
cidr_block = var.crete_cidr
|
||||
gateway_id = aws_internet_gateway.athens_gateway.id
|
||||
}
|
||||
tags = {
|
||||
Name = "Crete Route Table"
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_route_table_association" "crete_gateway_association" {
|
||||
subnet_id = aws_subnet.crete_subnet.id
|
||||
route_table_id = aws_route_table.crete_route_table.id
|
||||
}
|
||||
Reference in new issue
Block a user