Skip to content

Commit f3cd516

Browse files
authored
Cloud DNS managed zone: allow forwarding to IPv6 address (#15512)
1 parent f2cc033 commit f3cd516

File tree

3 files changed

+111
-46
lines changed

3 files changed

+111
-46
lines changed

mmv1/products/dns/ManagedZone.yaml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ examples:
6262
- name: 'dns_managed_zone_basic'
6363
primary_resource_id: 'example-zone'
6464
external_providers: ["random", "time"]
65-
# Randomness from random provider
65+
# Randomness from random provider
6666
skip_vcr: true
6767
- name: 'dns_managed_zone_private'
6868
primary_resource_id: 'private-zone'
@@ -89,6 +89,11 @@ examples:
8989
network_1_name: 'network-1'
9090
network_2_name: 'network-2'
9191
exclude_test: true
92+
- name: 'dns_managed_zone_private_forwarding_ipv6'
93+
primary_resource_id: 'private-zone'
94+
vars:
95+
zone_name: 'private-zone'
96+
network_1_name: 'network-1'
9297
- name: 'dns_managed_zone_private_gke'
9398
primary_resource_id: 'private-zone-gke'
9499
vars:
@@ -357,21 +362,32 @@ properties:
357362
properties:
358363
- name: 'ipv4Address'
359364
type: String
360-
description: 'IPv4 address of a target name server.'
365+
description: |
366+
IPv4 address of a target name server.
367+
Does not accept both fields (ipv4 & ipv6) being populated.
368+
- name: 'ipv6Address'
369+
type: String
370+
description: |
371+
IPv6 address of a target name server.
372+
Does not accept both fields (ipv4 & ipv6) being populated.
361373
- name: 'domainName'
362374
type: String
363-
description: 'Fully qualified domain name for the forwarding target.'
375+
description: |
376+
Fully qualified domain name for the forwarding target.
364377
- name: 'forwardingPath'
365378
type: Enum
366379
description: |
367-
Forwarding path for this TargetNameServer. If unset or `default` Cloud DNS will make forwarding
368-
decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go
369-
to the Internet. When set to `private`, Cloud DNS will always send queries through VPC for this target
380+
Forwarding path for this TargetNameServer. If unset or `default`
381+
Cloud DNS will make forwarding decision based on address ranges,
382+
i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go
383+
to the Internet. When set to `private`, Cloud DNS will always
384+
send queries through VPC for this target.
370385
enum_values:
371386
- 'default'
372387
- 'private'
373388
exactly_one_of:
374389
- 'ipv4_address'
390+
- 'ipv6_address'
375391
- 'domain_name'
376392
- name: 'peeringConfig'
377393
type: NestedObject
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
resource "google_dns_managed_zone" "{{$.PrimaryResourceId}}" {
2+
name = "{{index $.Vars "zone_name"}}"
3+
dns_name = "private.example.com."
4+
description = "Example private DNS zone"
5+
visibility = "private"
6+
7+
private_visibility_config {
8+
networks {
9+
network_url = google_compute_network.network_1.id
10+
}
11+
}
12+
13+
forwarding_config {
14+
target_name_servers {
15+
ipv6_address = "fd20:3e9:7a70:680d:0:8::"
16+
}
17+
}
18+
}
19+
20+
resource "google_compute_network" "network_1" {
21+
name = "{{index $.Vars "network_1_name"}}"
22+
auto_create_subnetworks = false
23+
}

0 commit comments

Comments
 (0)