Skip to content

Commit 0586dbd

Browse files
committed
Networking rtb association
1 parent aa2ab70 commit 0586dbd

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

infra/networking.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,13 @@ resource "aws_route_table" "default" {
4747
}
4848
}
4949

50+
resource "aws_route_table_association" "subnet_associations" {
51+
for_each = aws_subnet.default_subnets
52+
subnet_id = each.value.id
53+
route_table_id = aws_route_table.default.id
54+
}
55+
56+
5057
resource "aws_route" "igw_route" {
5158
route_table_id = aws_route_table.default.id
5259
destination_cidr_block = "0.0.0.0/16"

infra_old_prod/networking.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ resource "aws_route_table" "default" {
4747
}
4848
}
4949

50+
resource "aws_route_table_association" "subnet_associations" {
51+
for_each = aws_subnet.default_subnets
52+
subnet_id = each.value.id
53+
route_table_id = aws_route_table.default.id
54+
}
55+
5056
resource "aws_route" "igw_route" {
5157
route_table_id = aws_route_table.default.id
5258
destination_cidr_block = "0.0.0.0/16"
@@ -63,8 +69,8 @@ resource "aws_route53_zone" "child_hosted_zone" {
6369

6470
resource "aws_route53_record" "imms_ns" {
6571
zone_id = aws_route53_zone.parent_hosted_zone.zone_id
66-
name = var.child_route53_zone_name
72+
name = "imms"
6773
type = "NS"
68-
ttl = 172800
74+
ttl = 300 # 5 mins
6975
records = [for ns in aws_route53_zone.child_hosted_zone.name_servers : "${ns}."]
7076
}

0 commit comments

Comments
 (0)