!+ 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:
parent
86df303630
commit
8b1d576bfb
9
infra/eip.tf
Normal file
9
infra/eip.tf
Normal file
@ -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"
|
||||||
|
}
|
||||||
|
}
|
7
infra/gateway.tf
Normal file
7
infra/gateway.tf
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
resource "aws_internet_gateway" "athens_gateway" {
|
||||||
|
vpc_id = aws_vpc.athens_vpc.id
|
||||||
|
|
||||||
|
tags = {
|
||||||
|
Name = "Athens Common Internet Gateway"
|
||||||
|
}
|
||||||
|
}
|
15
infra/route-table.tf
Normal file
15
infra/route-table.tf
Normal file
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user