2022-02-28 03:27:27 -08:00
|
|
|
/**
|
|
|
|
* Copyright 2022 Google LLC
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
# tfdoc:file:description Production spoke DNS zones and peerings setup.
|
|
|
|
|
|
|
|
# GCP-specific environment zone
|
|
|
|
|
2023-05-03 22:38:40 -07:00
|
|
|
moved {
|
|
|
|
from = module.prod-dns-private-zone
|
|
|
|
to = module.prod-dns-priv-example
|
|
|
|
}
|
|
|
|
|
|
|
|
module "prod-dns-priv-example" {
|
2022-02-28 03:27:27 -08:00
|
|
|
source = "../../../modules/dns"
|
|
|
|
project_id = module.prod-spoke-project.project_id
|
|
|
|
type = "private"
|
|
|
|
name = "prod-gcp-example-com"
|
|
|
|
domain = "prod.gcp.example.com."
|
|
|
|
client_networks = [module.landing-vpc.self_link]
|
|
|
|
recordsets = {
|
2022-10-25 03:04:14 -07:00
|
|
|
"A localhost" = { records = ["127.0.0.1"] }
|
2022-02-28 03:27:27 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# root zone peering to landing to centralize configuration; remove if unneeded
|
|
|
|
|
2023-05-03 22:38:40 -07:00
|
|
|
moved {
|
|
|
|
from = module.prod-landing-root-dns-peering
|
|
|
|
to = module.prod-dns-peer-landing-root
|
|
|
|
}
|
|
|
|
|
|
|
|
module "prod-dns-peer-landing-root" {
|
2022-02-28 03:27:27 -08:00
|
|
|
source = "../../../modules/dns"
|
|
|
|
project_id = module.prod-spoke-project.project_id
|
|
|
|
type = "peering"
|
|
|
|
name = "prod-root-dns-peering"
|
|
|
|
domain = "."
|
|
|
|
client_networks = [module.prod-spoke-vpc.self_link]
|
|
|
|
peer_network = module.landing-vpc.self_link
|
|
|
|
}
|
|
|
|
|
2023-05-03 22:38:40 -07:00
|
|
|
moved {
|
|
|
|
from = module.prod-reverse-10-dns-peering
|
|
|
|
to = module.prod-dns-peer-landing-rev-10
|
|
|
|
}
|
|
|
|
|
|
|
|
module "prod-dns-peer-landing-rev-10" {
|
2022-02-28 03:27:27 -08:00
|
|
|
source = "../../../modules/dns"
|
|
|
|
project_id = module.prod-spoke-project.project_id
|
|
|
|
type = "peering"
|
|
|
|
name = "prod-reverse-10-dns-peering"
|
|
|
|
domain = "10.in-addr.arpa."
|
|
|
|
client_networks = [module.prod-spoke-vpc.self_link]
|
|
|
|
peer_network = module.landing-vpc.self_link
|
|
|
|
}
|