Skip to content

Commit

Permalink
Merge pull request #11 from d3b-center/feature/nk/toggle-public
Browse files Browse the repository at this point in the history
Feature/nk/toggle public
  • Loading branch information
uklineale authored Oct 24, 2024
2 parents 25a00e0 + fb48d7f commit ae1b02d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ resource "aws_route_table" "private" {
}

resource "aws_route" "private" {
count = length(var.private_subnet_cidr_blocks)
count = length(var.public_subnet_cidr_blocks) > 0 ? length(var.private_subnet_cidr_blocks) : 0

route_table_id = aws_route_table.private[count.index].id
destination_cidr_block = "0.0.0.0/0"
Expand Down Expand Up @@ -81,8 +81,8 @@ resource "aws_subnet" "private" {

vpc_id = aws_vpc.default.id
cidr_block = var.private_subnet_cidr_blocks[count.index]
enable_dns64 = true
enable_resource_name_dns_aaaa_record_on_launch = true
enable_dns64 = false
enable_resource_name_dns_aaaa_record_on_launch = false
enable_resource_name_dns_a_record_on_launch = true
availability_zone = var.availability_zones[count.index]
private_dns_hostname_type_on_launch = "resource-name"
Expand All @@ -100,8 +100,8 @@ resource "aws_subnet" "public" {

vpc_id = aws_vpc.default.id
cidr_block = var.public_subnet_cidr_blocks[count.index]
enable_dns64 = true
enable_resource_name_dns_aaaa_record_on_launch = true
enable_dns64 = false
enable_resource_name_dns_aaaa_record_on_launch = false
enable_resource_name_dns_a_record_on_launch = true
availability_zone = var.availability_zones[count.index]
map_public_ip_on_launch = true
Expand Down

0 comments on commit ae1b02d

Please sign in to comment.