Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions html/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,52 @@
FROM nginx
COPY . /usr/share/nginx/html
provider "aws" {
region = "us-east-1"
}

resource "aws_vpc" "main_vpc" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true

tags = {
Name = "main-vpc"
}
}

resource "aws_internet_gateway" "igw" {
vpc_id = aws_vpc.main_vpc.id

tags = {
Name = "main-igw"
}
}

resource "aws_subnet" "public_subnet" {
vpc_id = aws_vpc.main_vpc.id
cidr_block = "10.0.1.0/24"
availability_zone = "us-east-1a"
map_public_ip_on_launch = true

tags = {
Name = "public-subnet"
}
}

resource "aws_route_table" "public_rt" {
vpc_id = aws_vpc.main_vpc.id

route {
cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.igw.id
}

tags = {
Name = "public-rt"
}
}

resource "aws_route_table_association" "public_rt_assoc" {
subnet_id = aws_subnet.public_subnet.id
route_table_id = aws_route_table.public_rt.id
}