...
1/**
2 * Copyright 2022 Google LLC
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17```hcl
18resource "google_dns_policy" "example-policy" {
19 name = "example-policy"
20 enable_inbound_forwarding = true
21
22 enable_logging = true
23
24 alternative_name_server_config {
25 target_name_servers {
26 ipv4_address = "172.16.1.10"
27 forwarding_path = "private"
28 }
29 target_name_servers {
30 ipv4_address = "172.16.1.20"
31 }
32 }
33
34 networks {
35 network_url = google_compute_network.network-1.id
36 }
37 networks {
38 network_url = google_compute_network.network-2.id
39 }
40}
41
42resource "google_compute_network" "network-1" {
43 name = "network-1"
44 auto_create_subnetworks = false
45}
46
47resource "google_compute_network" "network-2" {
48 name = "network-2"
49 auto_create_subnetworks = false
50}
51```
View as plain text