Last active
October 22, 2023 15:54
-
-
Save snassr/65b7c89c989a723d8cc721f6344484ae to your computer and use it in GitHub Desktop.
medium_blog_652A1BBE_awsnetworking_vpc_subnet01.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resource "aws_subnet" "awsnetblog_vpc_01-subnet_01_public" { | |
assign_ipv6_address_on_creation = false | |
availability_zone = "us-west-2a" | |
cidr_block = "10.1.1.0/24" | |
map_public_ip_on_launch = false | |
vpc_id = aws_vpc.awsnetblog_vpc_01.id | |
timeouts {} | |
tags = { | |
"Name" = "awsnetblog_vpc_01-subnet_01_public" | |
"Project" = var.project | |
} | |
} | |
resource "aws_route_table_association" "awsnetblog_vpc_01-subnet_01_public-rtb_assoc" { | |
route_table_id = aws_route_table.awsnetblog_vpc_01-subnet_01_public-rtb.id | |
subnet_id = aws_subnet.awsnetblog_vpc_01-subnet_01_public.id | |
} | |
resource "aws_route_table" "awsnetblog_vpc_01-subnet_01_public-rtb" { | |
vpc_id = aws_vpc.awsnetblog_vpc_01.id | |
route { | |
cidr_block = "0.0.0.0/0" | |
gateway_id = aws_internet_gateway.awsnetblog_vpc_01-igw.id | |
} | |
tags = { | |
"Name" = "awsnetblog_vpc_01-subnet_01_public-rtb" | |
"Project" = var.project | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment