feat: add terraform infra as code for AWS fargate (#1987)

This commit is contained in:
dan sweeting
2021-02-23 17:10:33 +00:00
committed by GitHub
parent 347f49b2d4
commit d341ef72aa
10 changed files with 287 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
resource "aws_vpc" "main" {
enable_dns_support = true
cidr_block = "10.0.0.0/16"
tags = {
app = "ps5"
}
}
resource "aws_internet_gateway" "main" {
vpc_id = aws_vpc.main.id
tags = {
app = "ps5"
}
}
resource "aws_subnet" "aws-subnet" {
vpc_id = aws_vpc.main.id
cidr_block = aws_vpc.main.cidr_block
map_public_ip_on_launch = true
tags = {
app = "ps5"
}
}
resource "aws_route_table" "main" {
vpc_id = aws_vpc.main.id
route {
cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.main.id
}
tags = {
app = "ps5"
}
}
resource "aws_main_route_table_association" "main" {
route_table_id = aws_route_table.main.id
vpc_id = aws_vpc.main.id
}