Skip to content

Instantly share code, notes, and snippets.

@pmatsinopoulos
Created August 27, 2023 12:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmatsinopoulos/04498e189696a24a19f565378bf5d80a to your computer and use it in GitHub Desktop.
Save pmatsinopoulos/04498e189696a24a19f565378bf5d80a to your computer and use it in GitHub Desktop.
AWS Private and Public Subnets - vpc_subnets.tf
resource "aws_subnet" "subnet_1" {
availability_zone = "eu-west-1a"
cidr_block = "172.18.0.0/28"
tags = {
"Name" = "private-subnet-1"
}
vpc_id = aws_vpc.private_and_public_subnets.id
}
resource "aws_subnet" "subnet_2" {
availability_zone = "eu-west-1b"
cidr_block = "172.18.0.16/28"
tags = {
"Name" = "private-subnet-2"
}
vpc_id = aws_vpc.private_and_public_subnets.id
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment