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

Add DNS query logging to FAST net stages #2033

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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> | |
| [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> | |
| [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> |
| [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: 12 additions & 1 deletion fast/stages/2-networking-a-peering/dns-dev.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,3 +75,14 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
13 changes: 12 additions & 1 deletion fast/stages/2-networking-a-peering/dns-landing.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -85,3 +85,14 @@ 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"
project = module.landing-project.project_id
enable_logging = true
networks {
network_url = module.landing-vpc.id
}
}
13 changes: 12 additions & 1 deletion fast/stages/2-networking-a-peering/dns-prod.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,3 +75,14 @@ module "prod-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
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> | |
| [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> | |
| [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> |
| [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
13 changes: 12 additions & 1 deletion fast/stages/2-networking-b-vpn/dns-dev.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,3 +75,14 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
13 changes: 12 additions & 1 deletion fast/stages/2-networking-b-vpn/dns-landing.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -85,3 +85,14 @@ 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"
project = module.landing-project.project_id
enable_logging = true
networks {
network_url = module.landing-vpc.id
}
}
13 changes: 12 additions & 1 deletion fast/stages/2-networking-b-vpn/dns-prod.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -75,3 +75,14 @@ module "prod-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
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> | |
| [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> | |
| [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> |
| [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
14 changes: 13 additions & 1 deletion fast/stages/2-networking-c-nva/dns-dev.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,3 +70,15 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}


# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
16 changes: 15 additions & 1 deletion fast/stages/2-networking-c-nva/dns-landing.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -95,3 +95,17 @@ 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"
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
}
}
13 changes: 12 additions & 1 deletion fast/stages/2-networking-c-nva/dns-prod.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,3 +70,14 @@ module "prod-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
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> | |
| [dns-prod.tf](./dns-prod.tf) | Production spoke DNS zones and peerings setup. | <code>dns</code> · <code>dns-response-policy</code> | |
| [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> |
| [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: 12 additions & 1 deletion fast/stages/2-networking-d-separate-envs/dns-dev.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,3 +80,14 @@ 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"
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
13 changes: 12 additions & 1 deletion fast/stages/2-networking-d-separate-envs/dns-prod.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -80,3 +80,14 @@ 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"
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
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> | |
| [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> | |
| [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> |
| [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
14 changes: 13 additions & 1 deletion fast/stages/2-networking-e-nva-bgp/dns-dev.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,3 +70,15 @@ module "dev-dns-peer-landing-rev-10" {
}
}
}


# DNS policy to enable query logging

resource "google_dns_policy" "dev-dns-logging-policy" {
name = "logging-policy"
project = module.dev-spoke-project.project_id
enable_logging = true
networks {
network_url = module.dev-spoke-vpc.id
}
}
16 changes: 15 additions & 1 deletion fast/stages/2-networking-e-nva-bgp/dns-landing.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -95,3 +95,17 @@ 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"
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
}
}
13 changes: 12 additions & 1 deletion fast/stages/2-networking-e-nva-bgp/dns-prod.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright 2022 Google LLC
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -70,3 +70,14 @@ module "prod-dns-peer-landing-rev-10" {
}
}
}

# DNS policy to enable query logging

resource "google_dns_policy" "prod-dns-logging-policy" {
name = "logging-policy"
project = module.prod-spoke-project.project_id
enable_logging = true
networks {
network_url = module.prod-spoke-vpc.id
}
}
2 changes: 1 addition & 1 deletion tests/fast/stages/s2_networking_a_peering/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

counts:
modules: 29
resources: 151
resources: 154
2 changes: 1 addition & 1 deletion tests/fast/stages/s2_networking_b_vpn/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

counts:
modules: 31
resources: 188
resources: 191
2 changes: 1 addition & 1 deletion tests/fast/stages/s2_networking_c_nva/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@

counts:
modules: 43
resources: 199
resources: 202