Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leverage net-vpc module for DNS logging in FAST #2041

Merged
merged 2 commits into from
Feb 3, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions fast/stages/2-networking-a-peering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | modules | resources |
|---|---|---|---|
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | <code>google_dns_policy</code> |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | |
| [main.tf](./main.tf) | Networking folder and hierarchical policy. | <code>folder</code> · <code>net-firewall-policy</code> | |
| [monitoring-vpn-onprem.tf](./monitoring-vpn-onprem.tf) | VPN monitoring alerts. | | <code>google_monitoring_alert_policy</code> |
| [monitoring.tf](./monitoring.tf) | Network monitoring dashboards. | | <code>google_monitoring_dashboard</code> |
Expand Down
12 changes: 0 additions & 12 deletions fast/stages/2-networking-a-peering/dns-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,3 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
12 changes: 0 additions & 12 deletions fast/stages/2-networking-a-peering/dns-landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,3 @@ module "landing-dns-policy-googleapis" {
}
rules_file = var.factories_config.dns_policy_rules_file
}

# DNS policy to enable query logging

resource "google_dns_policy" "landing-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.landing-project.project_id
enable_logging = true
networks {
network_url = module.landing-vpc.id
}
}
12 changes: 0 additions & 12 deletions fast/stages/2-networking-a-peering/dns-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,3 @@ module "prod-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
3 changes: 3 additions & 0 deletions fast/stages/2-networking-a-peering/net-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ module "dev-spoke-vpc" {
project_id = module.dev-spoke-project.project_id
name = "dev-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/dev"
}
Expand Down
1 change: 1 addition & 0 deletions fast/stages/2-networking-a-peering/net-landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module "landing-vpc" {
mtu = 1500
dns_policy = {
inbound = true
logging = var.dns.enable_logging
}
# set explicit routes for googleapis in case the default route is deleted
create_googleapis_routes = {
Expand Down
3 changes: 3 additions & 0 deletions fast/stages/2-networking-a-peering/net-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ module "prod-spoke-vpc" {
project_id = module.prod-spoke-project.project_id
name = "prod-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/prod"
}
Expand Down
6 changes: 3 additions & 3 deletions fast/stages/2-networking-b-vpn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,9 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | modules | resources |
|---|---|---|---|
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | <code>google_dns_policy</code> |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | |
| [main.tf](./main.tf) | Networking folder and hierarchical policy. | <code>folder</code> · <code>net-firewall-policy</code> | |
| [monitoring-vpn.tf](./monitoring-vpn.tf) | VPN monitoring alerts. | | <code>google_monitoring_alert_policy</code> |
| [monitoring.tf](./monitoring.tf) | Network monitoring dashboards. | | <code>google_monitoring_dashboard</code> |
Expand Down
12 changes: 0 additions & 12 deletions fast/stages/2-networking-b-vpn/dns-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,3 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
12 changes: 0 additions & 12 deletions fast/stages/2-networking-b-vpn/dns-landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,3 @@ module "landing-dns-policy-googleapis" {
}
rules_file = var.factories_config.dns_policy_rules_file
}

# DNS policy to enable query logging

resource "google_dns_policy" "landing-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.landing-project.project_id
enable_logging = true
networks {
network_url = module.landing-vpc.id
}
}
12 changes: 0 additions & 12 deletions fast/stages/2-networking-b-vpn/dns-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,3 @@ module "prod-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
3 changes: 3 additions & 0 deletions fast/stages/2-networking-b-vpn/net-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ module "dev-spoke-vpc" {
project_id = module.dev-spoke-project.project_id
name = "dev-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/dev"
}
Expand Down
1 change: 1 addition & 0 deletions fast/stages/2-networking-b-vpn/net-landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ module "landing-vpc" {
mtu = 1500
dns_policy = {
inbound = true
logging = var.dns.enable_logging
}
# set explicit routes for googleapis in case the default route is deleted
create_googleapis_routes = {
Expand Down
3 changes: 3 additions & 0 deletions fast/stages/2-networking-b-vpn/net-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ module "prod-spoke-vpc" {
project_id = module.prod-spoke-project.project_id
name = "prod-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/prod"
}
Expand Down
6 changes: 3 additions & 3 deletions fast/stages/2-networking-c-nva/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -436,9 +436,9 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | modules | resources |
|---|---|---|---|
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | <code>google_dns_policy</code> |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | |
| [main.tf](./main.tf) | Networking folder and hierarchical policy. | <code>folder</code> · <code>net-firewall-policy</code> | |
| [monitoring-vpn-onprem.tf](./monitoring-vpn-onprem.tf) | VPN monitoring alerts. | | <code>google_monitoring_alert_policy</code> |
| [monitoring.tf](./monitoring.tf) | Network monitoring dashboards. | | <code>google_monitoring_dashboard</code> |
Expand Down
13 changes: 0 additions & 13 deletions fast/stages/2-networking-c-nva/dns-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,3 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}


# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
15 changes: 0 additions & 15 deletions fast/stages/2-networking-c-nva/dns-landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,3 @@ module "landing-dns-policy-googleapis" {
}
rules_file = var.factories_config.dns_policy_rules_file
}

# DNS policy to enable query logging

resource "google_dns_policy" "landing-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.landing-project.project_id
enable_logging = true
networks {
network_url = module.landing-trusted-vpc.id
}
networks {
network_url = module.landing-untrusted-vpc.id
}
}
12 changes: 0 additions & 12 deletions fast/stages/2-networking-c-nva/dns-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,3 @@ module "prod-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
3 changes: 3 additions & 0 deletions fast/stages/2-networking-c-nva/net-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ module "dev-spoke-vpc" {
project_id = module.dev-spoke-project.project_id
name = "dev-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/dev"
}
Expand Down
4 changes: 2 additions & 2 deletions fast/stages/2-networking-c-nva/net-landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ module "landing-untrusted-vpc" {
name = "prod-untrusted-landing-0"
mtu = 1500
dns_policy = {
inbound = false
logging = false
inbound = true
logging = var.dns.enable_logging
}
create_googleapis_routes = null
factories_config = {
Expand Down
3 changes: 3 additions & 0 deletions fast/stages/2-networking-c-nva/net-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ module "prod-spoke-vpc" {
project_id = module.prod-spoke-project.project_id
name = "prod-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/prod"
}
Expand Down
4 changes: 2 additions & 2 deletions fast/stages/2-networking-d-separate-envs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ Regions are defined via the `regions` variable which sets up a mapping between t

| name | description | modules | resources |
|---|---|---|---|
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | <code>google_dns_policy</code> |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | <code>google_dns_policy</code> |
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | |
| [main.tf](./main.tf) | Networking folder and hierarchical policy. | <code>folder</code> · <code>net-firewall-policy</code> | |
| [monitoring-vpn-onprem.tf](./monitoring-vpn-onprem.tf) | VPN monitoring alerts. | | <code>google_monitoring_alert_policy</code> |
| [monitoring.tf](./monitoring.tf) | Network monitoring dashboards. | | <code>google_monitoring_dashboard</code> |
Expand Down
12 changes: 0 additions & 12 deletions fast/stages/2-networking-d-separate-envs/dns-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,3 @@ module "dev-dns-policy-googleapis" {
}
rules_file = var.factories_config.dns_policy_rules_file
}

# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
12 changes: 0 additions & 12 deletions fast/stages/2-networking-d-separate-envs/dns-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,3 @@ module "prod-dns-policy-googleapis" {
}
rules_file = var.factories_config.dns_policy_rules_file
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
3 changes: 3 additions & 0 deletions fast/stages/2-networking-d-separate-envs/net-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ module "dev-spoke-vpc" {
project_id = module.dev-spoke-project.project_id
name = "dev-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/dev"
}
Expand Down
3 changes: 3 additions & 0 deletions fast/stages/2-networking-d-separate-envs/net-prod.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ module "prod-spoke-vpc" {
project_id = module.prod-spoke-project.project_id
name = "prod-spoke-0"
mtu = 1500
dns_policy = {
logging = var.dns.enable_logging
}
factories_config = {
subnets_folder = "${var.factories_config.data_dir}/subnets/prod"
}
Expand Down
6 changes: 3 additions & 3 deletions fast/stages/2-networking-e-nva-bgp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,9 @@ DNS configurations are centralised in the `dns-*.tf` files. Spokes delegate DNS

| name | description | modules | resources |
|---|---|---|---|
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | <code>google_dns_policy</code> |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | <code>google_dns_policy</code> |
| [dns-dev.tf](./dns-dev.tf) | Development spoke DNS zones and peerings setup. | <code>dns</code> | |
| [dns-landing.tf](./dns-landing.tf) | Landing DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> | |
| [main.tf](./main.tf) | Networking folder and hierarchical policy. | <code>folder</code> · <code>net-firewall-policy</code> | |
| [monitoring-vpn-onprem.tf](./monitoring-vpn-onprem.tf) | VPN monitoring alerts. | | <code>google_monitoring_alert_policy</code> |
| [monitoring.tf](./monitoring.tf) | Network monitoring dashboards. | | <code>google_monitoring_dashboard</code> |
Expand Down
13 changes: 0 additions & 13 deletions fast/stages/2-networking-e-nva-bgp/dns-dev.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,3 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}


# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
15 changes: 0 additions & 15 deletions fast/stages/2-networking-e-nva-bgp/dns-landing.tf
Original file line number Diff line number Diff line change
Expand Up @@ -97,18 +97,3 @@ module "landing-dns-policy-googleapis" {
}
rules_file = var.factories_config.dns_policy_rules_file
}

# DNS policy to enable query logging

resource "google_dns_policy" "landing-dns-logging-policy" {
name = "logging-policy"
count = var.dns.enable_logging ? 1 : 0
project = module.landing-project.project_id
enable_logging = true
networks {
network_url = module.landing-trusted-vpc.id
}
networks {
network_url = module.landing-untrusted-vpc.id
}
}
Loading
Loading