1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. dns
  5. ManagedZone
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.dns.ManagedZone

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.

    To get more information about ManagedZone, see:

    Example Usage

    Dns Managed Zone Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example_zone = new gcp.dns.ManagedZone("example-zone", {
        name: "example-zone",
        dnsName: "my-domain.com.",
        description: "Example DNS zone",
        labels: {
            foo: "bar",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example_zone = gcp.dns.ManagedZone("example-zone",
        name="example-zone",
        dns_name="my-domain.com.",
        description="Example DNS zone",
        labels={
            "foo": "bar",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dns.NewManagedZone(ctx, "example-zone", &dns.ManagedZoneArgs{
    			Name:        pulumi.String("example-zone"),
    			DnsName:     pulumi.String("my-domain.com."),
    			Description: pulumi.String("Example DNS zone"),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var example_zone = new Gcp.Dns.ManagedZone("example-zone", new()
        {
            Name = "example-zone",
            DnsName = "my-domain.com.",
            Description = "Example DNS zone",
            Labels = 
            {
                { "foo", "bar" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example_zone = new ManagedZone("example-zone", ManagedZoneArgs.builder()
                .name("example-zone")
                .dnsName("my-domain.com.")
                .description("Example DNS zone")
                .labels(Map.of("foo", "bar"))
                .build());
    
        }
    }
    
    resources:
      example-zone:
        type: gcp:dns:ManagedZone
        properties:
          name: example-zone
          dnsName: my-domain.com.
          description: Example DNS zone
          labels:
            foo: bar
    

    Dns Managed Zone Private

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network_1 = new gcp.compute.Network("network-1", {
        name: "network-1",
        autoCreateSubnetworks: false,
    });
    const network_2 = new gcp.compute.Network("network-2", {
        name: "network-2",
        autoCreateSubnetworks: false,
    });
    const private_zone = new gcp.dns.ManagedZone("private-zone", {
        name: "private-zone",
        dnsName: "private.example.com.",
        description: "Example private DNS zone",
        labels: {
            foo: "bar",
        },
        visibility: "private",
        privateVisibilityConfig: {
            networks: [
                {
                    networkUrl: network_1.id,
                },
                {
                    networkUrl: network_2.id,
                },
            ],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    network_1 = gcp.compute.Network("network-1",
        name="network-1",
        auto_create_subnetworks=False)
    network_2 = gcp.compute.Network("network-2",
        name="network-2",
        auto_create_subnetworks=False)
    private_zone = gcp.dns.ManagedZone("private-zone",
        name="private-zone",
        dns_name="private.example.com.",
        description="Example private DNS zone",
        labels={
            "foo": "bar",
        },
        visibility="private",
        private_visibility_config=gcp.dns.ManagedZonePrivateVisibilityConfigArgs(
            networks=[
                gcp.dns.ManagedZonePrivateVisibilityConfigNetworkArgs(
                    network_url=network_1.id,
                ),
                gcp.dns.ManagedZonePrivateVisibilityConfigNetworkArgs(
                    network_url=network_2.id,
                ),
            ],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewNetwork(ctx, "network-1", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-1"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNetwork(ctx, "network-2", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-2"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewManagedZone(ctx, "private-zone", &dns.ManagedZoneArgs{
    			Name:        pulumi.String("private-zone"),
    			DnsName:     pulumi.String("private.example.com."),
    			Description: pulumi.String("Example private DNS zone"),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    			Visibility: pulumi.String("private"),
    			PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
    				Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
    					&dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
    						NetworkUrl: network_1.ID(),
    					},
    					&dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
    						NetworkUrl: network_2.ID(),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network_1 = new Gcp.Compute.Network("network-1", new()
        {
            Name = "network-1",
            AutoCreateSubnetworks = false,
        });
    
        var network_2 = new Gcp.Compute.Network("network-2", new()
        {
            Name = "network-2",
            AutoCreateSubnetworks = false,
        });
    
        var private_zone = new Gcp.Dns.ManagedZone("private-zone", new()
        {
            Name = "private-zone",
            DnsName = "private.example.com.",
            Description = "Example private DNS zone",
            Labels = 
            {
                { "foo", "bar" },
            },
            Visibility = "private",
            PrivateVisibilityConfig = new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigArgs
            {
                Networks = new[]
                {
                    new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigNetworkArgs
                    {
                        NetworkUrl = network_1.Id,
                    },
                    new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigNetworkArgs
                    {
                        NetworkUrl = network_2.Id,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZonePrivateVisibilityConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var network_1 = new Network("network-1", NetworkArgs.builder()
                .name("network-1")
                .autoCreateSubnetworks(false)
                .build());
    
            var network_2 = new Network("network-2", NetworkArgs.builder()
                .name("network-2")
                .autoCreateSubnetworks(false)
                .build());
    
            var private_zone = new ManagedZone("private-zone", ManagedZoneArgs.builder()
                .name("private-zone")
                .dnsName("private.example.com.")
                .description("Example private DNS zone")
                .labels(Map.of("foo", "bar"))
                .visibility("private")
                .privateVisibilityConfig(ManagedZonePrivateVisibilityConfigArgs.builder()
                    .networks(                
                        ManagedZonePrivateVisibilityConfigNetworkArgs.builder()
                            .networkUrl(network_1.id())
                            .build(),
                        ManagedZonePrivateVisibilityConfigNetworkArgs.builder()
                            .networkUrl(network_2.id())
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      private-zone:
        type: gcp:dns:ManagedZone
        properties:
          name: private-zone
          dnsName: private.example.com.
          description: Example private DNS zone
          labels:
            foo: bar
          visibility: private
          privateVisibilityConfig:
            networks:
              - networkUrl: ${["network-1"].id}
              - networkUrl: ${["network-2"].id}
      network-1:
        type: gcp:compute:Network
        properties:
          name: network-1
          autoCreateSubnetworks: false
      network-2:
        type: gcp:compute:Network
        properties:
          name: network-2
          autoCreateSubnetworks: false
    

    Dns Managed Zone Private Forwarding

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network_1 = new gcp.compute.Network("network-1", {
        name: "network-1",
        autoCreateSubnetworks: false,
    });
    const network_2 = new gcp.compute.Network("network-2", {
        name: "network-2",
        autoCreateSubnetworks: false,
    });
    const private_zone = new gcp.dns.ManagedZone("private-zone", {
        name: "private-zone",
        dnsName: "private.example.com.",
        description: "Example private DNS zone",
        labels: {
            foo: "bar",
        },
        visibility: "private",
        privateVisibilityConfig: {
            networks: [
                {
                    networkUrl: network_1.id,
                },
                {
                    networkUrl: network_2.id,
                },
            ],
        },
        forwardingConfig: {
            targetNameServers: [
                {
                    ipv4Address: "172.16.1.10",
                },
                {
                    ipv4Address: "172.16.1.20",
                },
            ],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    network_1 = gcp.compute.Network("network-1",
        name="network-1",
        auto_create_subnetworks=False)
    network_2 = gcp.compute.Network("network-2",
        name="network-2",
        auto_create_subnetworks=False)
    private_zone = gcp.dns.ManagedZone("private-zone",
        name="private-zone",
        dns_name="private.example.com.",
        description="Example private DNS zone",
        labels={
            "foo": "bar",
        },
        visibility="private",
        private_visibility_config=gcp.dns.ManagedZonePrivateVisibilityConfigArgs(
            networks=[
                gcp.dns.ManagedZonePrivateVisibilityConfigNetworkArgs(
                    network_url=network_1.id,
                ),
                gcp.dns.ManagedZonePrivateVisibilityConfigNetworkArgs(
                    network_url=network_2.id,
                ),
            ],
        ),
        forwarding_config=gcp.dns.ManagedZoneForwardingConfigArgs(
            target_name_servers=[
                gcp.dns.ManagedZoneForwardingConfigTargetNameServerArgs(
                    ipv4_address="172.16.1.10",
                ),
                gcp.dns.ManagedZoneForwardingConfigTargetNameServerArgs(
                    ipv4_address="172.16.1.20",
                ),
            ],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewNetwork(ctx, "network-1", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-1"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNetwork(ctx, "network-2", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-2"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewManagedZone(ctx, "private-zone", &dns.ManagedZoneArgs{
    			Name:        pulumi.String("private-zone"),
    			DnsName:     pulumi.String("private.example.com."),
    			Description: pulumi.String("Example private DNS zone"),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    			Visibility: pulumi.String("private"),
    			PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
    				Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
    					&dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
    						NetworkUrl: network_1.ID(),
    					},
    					&dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
    						NetworkUrl: network_2.ID(),
    					},
    				},
    			},
    			ForwardingConfig: &dns.ManagedZoneForwardingConfigArgs{
    				TargetNameServers: dns.ManagedZoneForwardingConfigTargetNameServerArray{
    					&dns.ManagedZoneForwardingConfigTargetNameServerArgs{
    						Ipv4Address: pulumi.String("172.16.1.10"),
    					},
    					&dns.ManagedZoneForwardingConfigTargetNameServerArgs{
    						Ipv4Address: pulumi.String("172.16.1.20"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network_1 = new Gcp.Compute.Network("network-1", new()
        {
            Name = "network-1",
            AutoCreateSubnetworks = false,
        });
    
        var network_2 = new Gcp.Compute.Network("network-2", new()
        {
            Name = "network-2",
            AutoCreateSubnetworks = false,
        });
    
        var private_zone = new Gcp.Dns.ManagedZone("private-zone", new()
        {
            Name = "private-zone",
            DnsName = "private.example.com.",
            Description = "Example private DNS zone",
            Labels = 
            {
                { "foo", "bar" },
            },
            Visibility = "private",
            PrivateVisibilityConfig = new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigArgs
            {
                Networks = new[]
                {
                    new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigNetworkArgs
                    {
                        NetworkUrl = network_1.Id,
                    },
                    new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigNetworkArgs
                    {
                        NetworkUrl = network_2.Id,
                    },
                },
            },
            ForwardingConfig = new Gcp.Dns.Inputs.ManagedZoneForwardingConfigArgs
            {
                TargetNameServers = new[]
                {
                    new Gcp.Dns.Inputs.ManagedZoneForwardingConfigTargetNameServerArgs
                    {
                        Ipv4Address = "172.16.1.10",
                    },
                    new Gcp.Dns.Inputs.ManagedZoneForwardingConfigTargetNameServerArgs
                    {
                        Ipv4Address = "172.16.1.20",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZonePrivateVisibilityConfigArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZoneForwardingConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var network_1 = new Network("network-1", NetworkArgs.builder()
                .name("network-1")
                .autoCreateSubnetworks(false)
                .build());
    
            var network_2 = new Network("network-2", NetworkArgs.builder()
                .name("network-2")
                .autoCreateSubnetworks(false)
                .build());
    
            var private_zone = new ManagedZone("private-zone", ManagedZoneArgs.builder()
                .name("private-zone")
                .dnsName("private.example.com.")
                .description("Example private DNS zone")
                .labels(Map.of("foo", "bar"))
                .visibility("private")
                .privateVisibilityConfig(ManagedZonePrivateVisibilityConfigArgs.builder()
                    .networks(                
                        ManagedZonePrivateVisibilityConfigNetworkArgs.builder()
                            .networkUrl(network_1.id())
                            .build(),
                        ManagedZonePrivateVisibilityConfigNetworkArgs.builder()
                            .networkUrl(network_2.id())
                            .build())
                    .build())
                .forwardingConfig(ManagedZoneForwardingConfigArgs.builder()
                    .targetNameServers(                
                        ManagedZoneForwardingConfigTargetNameServerArgs.builder()
                            .ipv4Address("172.16.1.10")
                            .build(),
                        ManagedZoneForwardingConfigTargetNameServerArgs.builder()
                            .ipv4Address("172.16.1.20")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      private-zone:
        type: gcp:dns:ManagedZone
        properties:
          name: private-zone
          dnsName: private.example.com.
          description: Example private DNS zone
          labels:
            foo: bar
          visibility: private
          privateVisibilityConfig:
            networks:
              - networkUrl: ${["network-1"].id}
              - networkUrl: ${["network-2"].id}
          forwardingConfig:
            targetNameServers:
              - ipv4Address: 172.16.1.10
              - ipv4Address: 172.16.1.20
      network-1:
        type: gcp:compute:Network
        properties:
          name: network-1
          autoCreateSubnetworks: false
      network-2:
        type: gcp:compute:Network
        properties:
          name: network-2
          autoCreateSubnetworks: false
    

    Dns Managed Zone Private Gke

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network_1 = new gcp.compute.Network("network-1", {
        name: "network-1",
        autoCreateSubnetworks: false,
    });
    const subnetwork_1 = new gcp.compute.Subnetwork("subnetwork-1", {
        name: network_1.name,
        network: network_1.name,
        ipCidrRange: "10.0.36.0/24",
        region: "us-central1",
        privateIpGoogleAccess: true,
        secondaryIpRanges: [
            {
                rangeName: "pod",
                ipCidrRange: "10.0.0.0/19",
            },
            {
                rangeName: "svc",
                ipCidrRange: "10.0.32.0/22",
            },
        ],
    });
    const cluster_1 = new gcp.container.Cluster("cluster-1", {
        name: "cluster-1",
        location: "us-central1-c",
        initialNodeCount: 1,
        networkingMode: "VPC_NATIVE",
        defaultSnatStatus: {
            disabled: true,
        },
        network: network_1.name,
        subnetwork: subnetwork_1.name,
        privateClusterConfig: {
            enablePrivateEndpoint: true,
            enablePrivateNodes: true,
            masterIpv4CidrBlock: "10.42.0.0/28",
            masterGlobalAccessConfig: {
                enabled: true,
            },
        },
        masterAuthorizedNetworksConfig: {},
        ipAllocationPolicy: {
            clusterSecondaryRangeName: subnetwork_1.secondaryIpRanges.apply(secondaryIpRanges => secondaryIpRanges[0].rangeName),
            servicesSecondaryRangeName: subnetwork_1.secondaryIpRanges.apply(secondaryIpRanges => secondaryIpRanges[1].rangeName),
        },
        deletionProtection: true,
    });
    const private_zone_gke = new gcp.dns.ManagedZone("private-zone-gke", {
        name: "private-zone",
        dnsName: "private.example.com.",
        description: "Example private DNS zone",
        labels: {
            foo: "bar",
        },
        visibility: "private",
        privateVisibilityConfig: {
            gkeClusters: [{
                gkeClusterName: cluster_1.id,
            }],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    network_1 = gcp.compute.Network("network-1",
        name="network-1",
        auto_create_subnetworks=False)
    subnetwork_1 = gcp.compute.Subnetwork("subnetwork-1",
        name=network_1.name,
        network=network_1.name,
        ip_cidr_range="10.0.36.0/24",
        region="us-central1",
        private_ip_google_access=True,
        secondary_ip_ranges=[
            gcp.compute.SubnetworkSecondaryIpRangeArgs(
                range_name="pod",
                ip_cidr_range="10.0.0.0/19",
            ),
            gcp.compute.SubnetworkSecondaryIpRangeArgs(
                range_name="svc",
                ip_cidr_range="10.0.32.0/22",
            ),
        ])
    cluster_1 = gcp.container.Cluster("cluster-1",
        name="cluster-1",
        location="us-central1-c",
        initial_node_count=1,
        networking_mode="VPC_NATIVE",
        default_snat_status=gcp.container.ClusterDefaultSnatStatusArgs(
            disabled=True,
        ),
        network=network_1.name,
        subnetwork=subnetwork_1.name,
        private_cluster_config=gcp.container.ClusterPrivateClusterConfigArgs(
            enable_private_endpoint=True,
            enable_private_nodes=True,
            master_ipv4_cidr_block="10.42.0.0/28",
            master_global_access_config=gcp.container.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs(
                enabled=True,
            ),
        ),
        master_authorized_networks_config=gcp.container.ClusterMasterAuthorizedNetworksConfigArgs(),
        ip_allocation_policy=gcp.container.ClusterIpAllocationPolicyArgs(
            cluster_secondary_range_name=subnetwork_1.secondary_ip_ranges[0].range_name,
            services_secondary_range_name=subnetwork_1.secondary_ip_ranges[1].range_name,
        ),
        deletion_protection=True)
    private_zone_gke = gcp.dns.ManagedZone("private-zone-gke",
        name="private-zone",
        dns_name="private.example.com.",
        description="Example private DNS zone",
        labels={
            "foo": "bar",
        },
        visibility="private",
        private_visibility_config=gcp.dns.ManagedZonePrivateVisibilityConfigArgs(
            gke_clusters=[gcp.dns.ManagedZonePrivateVisibilityConfigGkeClusterArgs(
                gke_cluster_name=cluster_1.id,
            )],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/container"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewNetwork(ctx, "network-1", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-1"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewSubnetwork(ctx, "subnetwork-1", &compute.SubnetworkArgs{
    			Name:                  network_1.Name,
    			Network:               network_1.Name,
    			IpCidrRange:           pulumi.String("10.0.36.0/24"),
    			Region:                pulumi.String("us-central1"),
    			PrivateIpGoogleAccess: pulumi.Bool(true),
    			SecondaryIpRanges: compute.SubnetworkSecondaryIpRangeArray{
    				&compute.SubnetworkSecondaryIpRangeArgs{
    					RangeName:   pulumi.String("pod"),
    					IpCidrRange: pulumi.String("10.0.0.0/19"),
    				},
    				&compute.SubnetworkSecondaryIpRangeArgs{
    					RangeName:   pulumi.String("svc"),
    					IpCidrRange: pulumi.String("10.0.32.0/22"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = container.NewCluster(ctx, "cluster-1", &container.ClusterArgs{
    			Name:             pulumi.String("cluster-1"),
    			Location:         pulumi.String("us-central1-c"),
    			InitialNodeCount: pulumi.Int(1),
    			NetworkingMode:   pulumi.String("VPC_NATIVE"),
    			DefaultSnatStatus: &container.ClusterDefaultSnatStatusArgs{
    				Disabled: pulumi.Bool(true),
    			},
    			Network:    network_1.Name,
    			Subnetwork: subnetwork_1.Name,
    			PrivateClusterConfig: &container.ClusterPrivateClusterConfigArgs{
    				EnablePrivateEndpoint: pulumi.Bool(true),
    				EnablePrivateNodes:    pulumi.Bool(true),
    				MasterIpv4CidrBlock:   pulumi.String("10.42.0.0/28"),
    				MasterGlobalAccessConfig: &container.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs{
    					Enabled: pulumi.Bool(true),
    				},
    			},
    			MasterAuthorizedNetworksConfig: nil,
    			IpAllocationPolicy: &container.ClusterIpAllocationPolicyArgs{
    				ClusterSecondaryRangeName: subnetwork_1.SecondaryIpRanges.ApplyT(func(secondaryIpRanges []compute.SubnetworkSecondaryIpRange) (*string, error) {
    					return &secondaryIpRanges[0].RangeName, nil
    				}).(pulumi.StringPtrOutput),
    				ServicesSecondaryRangeName: subnetwork_1.SecondaryIpRanges.ApplyT(func(secondaryIpRanges []compute.SubnetworkSecondaryIpRange) (*string, error) {
    					return &secondaryIpRanges[1].RangeName, nil
    				}).(pulumi.StringPtrOutput),
    			},
    			DeletionProtection: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewManagedZone(ctx, "private-zone-gke", &dns.ManagedZoneArgs{
    			Name:        pulumi.String("private-zone"),
    			DnsName:     pulumi.String("private.example.com."),
    			Description: pulumi.String("Example private DNS zone"),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    			Visibility: pulumi.String("private"),
    			PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
    				GkeClusters: dns.ManagedZonePrivateVisibilityConfigGkeClusterArray{
    					&dns.ManagedZonePrivateVisibilityConfigGkeClusterArgs{
    						GkeClusterName: cluster_1.ID(),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network_1 = new Gcp.Compute.Network("network-1", new()
        {
            Name = "network-1",
            AutoCreateSubnetworks = false,
        });
    
        var subnetwork_1 = new Gcp.Compute.Subnetwork("subnetwork-1", new()
        {
            Name = network_1.Name,
            Network = network_1.Name,
            IpCidrRange = "10.0.36.0/24",
            Region = "us-central1",
            PrivateIpGoogleAccess = true,
            SecondaryIpRanges = new[]
            {
                new Gcp.Compute.Inputs.SubnetworkSecondaryIpRangeArgs
                {
                    RangeName = "pod",
                    IpCidrRange = "10.0.0.0/19",
                },
                new Gcp.Compute.Inputs.SubnetworkSecondaryIpRangeArgs
                {
                    RangeName = "svc",
                    IpCidrRange = "10.0.32.0/22",
                },
            },
        });
    
        var cluster_1 = new Gcp.Container.Cluster("cluster-1", new()
        {
            Name = "cluster-1",
            Location = "us-central1-c",
            InitialNodeCount = 1,
            NetworkingMode = "VPC_NATIVE",
            DefaultSnatStatus = new Gcp.Container.Inputs.ClusterDefaultSnatStatusArgs
            {
                Disabled = true,
            },
            Network = network_1.Name,
            Subnetwork = subnetwork_1.Name,
            PrivateClusterConfig = new Gcp.Container.Inputs.ClusterPrivateClusterConfigArgs
            {
                EnablePrivateEndpoint = true,
                EnablePrivateNodes = true,
                MasterIpv4CidrBlock = "10.42.0.0/28",
                MasterGlobalAccessConfig = new Gcp.Container.Inputs.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs
                {
                    Enabled = true,
                },
            },
            MasterAuthorizedNetworksConfig = null,
            IpAllocationPolicy = new Gcp.Container.Inputs.ClusterIpAllocationPolicyArgs
            {
                ClusterSecondaryRangeName = subnetwork_1.SecondaryIpRanges.Apply(secondaryIpRanges => secondaryIpRanges[0].RangeName),
                ServicesSecondaryRangeName = subnetwork_1.SecondaryIpRanges.Apply(secondaryIpRanges => secondaryIpRanges[1].RangeName),
            },
            DeletionProtection = true,
        });
    
        var private_zone_gke = new Gcp.Dns.ManagedZone("private-zone-gke", new()
        {
            Name = "private-zone",
            DnsName = "private.example.com.",
            Description = "Example private DNS zone",
            Labels = 
            {
                { "foo", "bar" },
            },
            Visibility = "private",
            PrivateVisibilityConfig = new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigArgs
            {
                GkeClusters = new[]
                {
                    new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigGkeClusterArgs
                    {
                        GkeClusterName = cluster_1.Id,
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.Subnetwork;
    import com.pulumi.gcp.compute.SubnetworkArgs;
    import com.pulumi.gcp.compute.inputs.SubnetworkSecondaryIpRangeArgs;
    import com.pulumi.gcp.container.Cluster;
    import com.pulumi.gcp.container.ClusterArgs;
    import com.pulumi.gcp.container.inputs.ClusterDefaultSnatStatusArgs;
    import com.pulumi.gcp.container.inputs.ClusterPrivateClusterConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterMasterAuthorizedNetworksConfigArgs;
    import com.pulumi.gcp.container.inputs.ClusterIpAllocationPolicyArgs;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZonePrivateVisibilityConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var network_1 = new Network("network-1", NetworkArgs.builder()
                .name("network-1")
                .autoCreateSubnetworks(false)
                .build());
    
            var subnetwork_1 = new Subnetwork("subnetwork-1", SubnetworkArgs.builder()
                .name(network_1.name())
                .network(network_1.name())
                .ipCidrRange("10.0.36.0/24")
                .region("us-central1")
                .privateIpGoogleAccess(true)
                .secondaryIpRanges(            
                    SubnetworkSecondaryIpRangeArgs.builder()
                        .rangeName("pod")
                        .ipCidrRange("10.0.0.0/19")
                        .build(),
                    SubnetworkSecondaryIpRangeArgs.builder()
                        .rangeName("svc")
                        .ipCidrRange("10.0.32.0/22")
                        .build())
                .build());
    
            var cluster_1 = new Cluster("cluster-1", ClusterArgs.builder()
                .name("cluster-1")
                .location("us-central1-c")
                .initialNodeCount(1)
                .networkingMode("VPC_NATIVE")
                .defaultSnatStatus(ClusterDefaultSnatStatusArgs.builder()
                    .disabled(true)
                    .build())
                .network(network_1.name())
                .subnetwork(subnetwork_1.name())
                .privateClusterConfig(ClusterPrivateClusterConfigArgs.builder()
                    .enablePrivateEndpoint(true)
                    .enablePrivateNodes(true)
                    .masterIpv4CidrBlock("10.42.0.0/28")
                    .masterGlobalAccessConfig(ClusterPrivateClusterConfigMasterGlobalAccessConfigArgs.builder()
                        .enabled(true)
                        .build())
                    .build())
                .masterAuthorizedNetworksConfig()
                .ipAllocationPolicy(ClusterIpAllocationPolicyArgs.builder()
                    .clusterSecondaryRangeName(subnetwork_1.secondaryIpRanges().applyValue(secondaryIpRanges -> secondaryIpRanges[0].rangeName()))
                    .servicesSecondaryRangeName(subnetwork_1.secondaryIpRanges().applyValue(secondaryIpRanges -> secondaryIpRanges[1].rangeName()))
                    .build())
                .deletionProtection("true")
                .build());
    
            var private_zone_gke = new ManagedZone("private-zone-gke", ManagedZoneArgs.builder()
                .name("private-zone")
                .dnsName("private.example.com.")
                .description("Example private DNS zone")
                .labels(Map.of("foo", "bar"))
                .visibility("private")
                .privateVisibilityConfig(ManagedZonePrivateVisibilityConfigArgs.builder()
                    .gkeClusters(ManagedZonePrivateVisibilityConfigGkeClusterArgs.builder()
                        .gkeClusterName(cluster_1.id())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      private-zone-gke:
        type: gcp:dns:ManagedZone
        properties:
          name: private-zone
          dnsName: private.example.com.
          description: Example private DNS zone
          labels:
            foo: bar
          visibility: private
          privateVisibilityConfig:
            gkeClusters:
              - gkeClusterName: ${["cluster-1"].id}
      network-1:
        type: gcp:compute:Network
        properties:
          name: network-1
          autoCreateSubnetworks: false
      subnetwork-1:
        type: gcp:compute:Subnetwork
        properties:
          name: ${["network-1"].name}
          network: ${["network-1"].name}
          ipCidrRange: 10.0.36.0/24
          region: us-central1
          privateIpGoogleAccess: true
          secondaryIpRanges:
            - rangeName: pod
              ipCidrRange: 10.0.0.0/19
            - rangeName: svc
              ipCidrRange: 10.0.32.0/22
      cluster-1:
        type: gcp:container:Cluster
        properties:
          name: cluster-1
          location: us-central1-c
          initialNodeCount: 1
          networkingMode: VPC_NATIVE
          defaultSnatStatus:
            disabled: true
          network: ${["network-1"].name}
          subnetwork: ${["subnetwork-1"].name}
          privateClusterConfig:
            enablePrivateEndpoint: true
            enablePrivateNodes: true
            masterIpv4CidrBlock: 10.42.0.0/28
            masterGlobalAccessConfig:
              enabled: true
          masterAuthorizedNetworksConfig: {}
          ipAllocationPolicy:
            clusterSecondaryRangeName: ${["subnetwork-1"].secondaryIpRanges[0].rangeName}
            servicesSecondaryRangeName: ${["subnetwork-1"].secondaryIpRanges[1].rangeName}
          deletionProtection: 'true'
    

    Dns Managed Zone Private Peering

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const network_source = new gcp.compute.Network("network-source", {
        name: "network-source",
        autoCreateSubnetworks: false,
    });
    const network_target = new gcp.compute.Network("network-target", {
        name: "network-target",
        autoCreateSubnetworks: false,
    });
    const peering_zone = new gcp.dns.ManagedZone("peering-zone", {
        name: "peering-zone",
        dnsName: "peering.example.com.",
        description: "Example private DNS peering zone",
        visibility: "private",
        privateVisibilityConfig: {
            networks: [{
                networkUrl: network_source.id,
            }],
        },
        peeringConfig: {
            targetNetwork: {
                networkUrl: network_target.id,
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    network_source = gcp.compute.Network("network-source",
        name="network-source",
        auto_create_subnetworks=False)
    network_target = gcp.compute.Network("network-target",
        name="network-target",
        auto_create_subnetworks=False)
    peering_zone = gcp.dns.ManagedZone("peering-zone",
        name="peering-zone",
        dns_name="peering.example.com.",
        description="Example private DNS peering zone",
        visibility="private",
        private_visibility_config=gcp.dns.ManagedZonePrivateVisibilityConfigArgs(
            networks=[gcp.dns.ManagedZonePrivateVisibilityConfigNetworkArgs(
                network_url=network_source.id,
            )],
        ),
        peering_config=gcp.dns.ManagedZonePeeringConfigArgs(
            target_network=gcp.dns.ManagedZonePeeringConfigTargetNetworkArgs(
                network_url=network_target.id,
            ),
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewNetwork(ctx, "network-source", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-source"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNetwork(ctx, "network-target", &compute.NetworkArgs{
    			Name:                  pulumi.String("network-target"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewManagedZone(ctx, "peering-zone", &dns.ManagedZoneArgs{
    			Name:        pulumi.String("peering-zone"),
    			DnsName:     pulumi.String("peering.example.com."),
    			Description: pulumi.String("Example private DNS peering zone"),
    			Visibility:  pulumi.String("private"),
    			PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
    				Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
    					&dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
    						NetworkUrl: network_source.ID(),
    					},
    				},
    			},
    			PeeringConfig: &dns.ManagedZonePeeringConfigArgs{
    				TargetNetwork: &dns.ManagedZonePeeringConfigTargetNetworkArgs{
    					NetworkUrl: network_target.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var network_source = new Gcp.Compute.Network("network-source", new()
        {
            Name = "network-source",
            AutoCreateSubnetworks = false,
        });
    
        var network_target = new Gcp.Compute.Network("network-target", new()
        {
            Name = "network-target",
            AutoCreateSubnetworks = false,
        });
    
        var peering_zone = new Gcp.Dns.ManagedZone("peering-zone", new()
        {
            Name = "peering-zone",
            DnsName = "peering.example.com.",
            Description = "Example private DNS peering zone",
            Visibility = "private",
            PrivateVisibilityConfig = new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigArgs
            {
                Networks = new[]
                {
                    new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigNetworkArgs
                    {
                        NetworkUrl = network_source.Id,
                    },
                },
            },
            PeeringConfig = new Gcp.Dns.Inputs.ManagedZonePeeringConfigArgs
            {
                TargetNetwork = new Gcp.Dns.Inputs.ManagedZonePeeringConfigTargetNetworkArgs
                {
                    NetworkUrl = network_target.Id,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZonePrivateVisibilityConfigArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZonePeeringConfigArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZonePeeringConfigTargetNetworkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var network_source = new Network("network-source", NetworkArgs.builder()
                .name("network-source")
                .autoCreateSubnetworks(false)
                .build());
    
            var network_target = new Network("network-target", NetworkArgs.builder()
                .name("network-target")
                .autoCreateSubnetworks(false)
                .build());
    
            var peering_zone = new ManagedZone("peering-zone", ManagedZoneArgs.builder()
                .name("peering-zone")
                .dnsName("peering.example.com.")
                .description("Example private DNS peering zone")
                .visibility("private")
                .privateVisibilityConfig(ManagedZonePrivateVisibilityConfigArgs.builder()
                    .networks(ManagedZonePrivateVisibilityConfigNetworkArgs.builder()
                        .networkUrl(network_source.id())
                        .build())
                    .build())
                .peeringConfig(ManagedZonePeeringConfigArgs.builder()
                    .targetNetwork(ManagedZonePeeringConfigTargetNetworkArgs.builder()
                        .networkUrl(network_target.id())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      peering-zone:
        type: gcp:dns:ManagedZone
        properties:
          name: peering-zone
          dnsName: peering.example.com.
          description: Example private DNS peering zone
          visibility: private
          privateVisibilityConfig:
            networks:
              - networkUrl: ${["network-source"].id}
          peeringConfig:
            targetNetwork:
              networkUrl: ${["network-target"].id}
      network-source:
        type: gcp:compute:Network
        properties:
          name: network-source
          autoCreateSubnetworks: false
      network-target:
        type: gcp:compute:Network
        properties:
          name: network-target
          autoCreateSubnetworks: false
    

    Dns Managed Zone Service Directory

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example = new gcp.servicedirectory.Namespace("example", {
        namespaceId: "example",
        location: "us-central1",
    });
    const sd_zone = new gcp.dns.ManagedZone("sd-zone", {
        name: "peering-zone",
        dnsName: "services.example.com.",
        description: "Example private DNS Service Directory zone",
        visibility: "private",
        serviceDirectoryConfig: {
            namespace: {
                namespaceUrl: example.id,
            },
        },
    });
    const network = new gcp.compute.Network("network", {
        name: "network",
        autoCreateSubnetworks: false,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example = gcp.servicedirectory.Namespace("example",
        namespace_id="example",
        location="us-central1")
    sd_zone = gcp.dns.ManagedZone("sd-zone",
        name="peering-zone",
        dns_name="services.example.com.",
        description="Example private DNS Service Directory zone",
        visibility="private",
        service_directory_config=gcp.dns.ManagedZoneServiceDirectoryConfigArgs(
            namespace=gcp.dns.ManagedZoneServiceDirectoryConfigNamespaceArgs(
                namespace_url=example.id,
            ),
        ))
    network = gcp.compute.Network("network",
        name="network",
        auto_create_subnetworks=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/servicedirectory"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := servicedirectory.NewNamespace(ctx, "example", &servicedirectory.NamespaceArgs{
    			NamespaceId: pulumi.String("example"),
    			Location:    pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewManagedZone(ctx, "sd-zone", &dns.ManagedZoneArgs{
    			Name:        pulumi.String("peering-zone"),
    			DnsName:     pulumi.String("services.example.com."),
    			Description: pulumi.String("Example private DNS Service Directory zone"),
    			Visibility:  pulumi.String("private"),
    			ServiceDirectoryConfig: &dns.ManagedZoneServiceDirectoryConfigArgs{
    				Namespace: &dns.ManagedZoneServiceDirectoryConfigNamespaceArgs{
    					NamespaceUrl: example.ID(),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewNetwork(ctx, "network", &compute.NetworkArgs{
    			Name:                  pulumi.String("network"),
    			AutoCreateSubnetworks: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Gcp.ServiceDirectory.Namespace("example", new()
        {
            NamespaceId = "example",
            Location = "us-central1",
        });
    
        var sd_zone = new Gcp.Dns.ManagedZone("sd-zone", new()
        {
            Name = "peering-zone",
            DnsName = "services.example.com.",
            Description = "Example private DNS Service Directory zone",
            Visibility = "private",
            ServiceDirectoryConfig = new Gcp.Dns.Inputs.ManagedZoneServiceDirectoryConfigArgs
            {
                Namespace = new Gcp.Dns.Inputs.ManagedZoneServiceDirectoryConfigNamespaceArgs
                {
                    NamespaceUrl = example.Id,
                },
            },
        });
    
        var network = new Gcp.Compute.Network("network", new()
        {
            Name = "network",
            AutoCreateSubnetworks = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.servicedirectory.Namespace;
    import com.pulumi.gcp.servicedirectory.NamespaceArgs;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZoneServiceDirectoryConfigArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZoneServiceDirectoryConfigNamespaceArgs;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new Namespace("example", NamespaceArgs.builder()
                .namespaceId("example")
                .location("us-central1")
                .build());
    
            var sd_zone = new ManagedZone("sd-zone", ManagedZoneArgs.builder()
                .name("peering-zone")
                .dnsName("services.example.com.")
                .description("Example private DNS Service Directory zone")
                .visibility("private")
                .serviceDirectoryConfig(ManagedZoneServiceDirectoryConfigArgs.builder()
                    .namespace(ManagedZoneServiceDirectoryConfigNamespaceArgs.builder()
                        .namespaceUrl(example.id())
                        .build())
                    .build())
                .build());
    
            var network = new Network("network", NetworkArgs.builder()
                .name("network")
                .autoCreateSubnetworks(false)
                .build());
    
        }
    }
    
    resources:
      sd-zone:
        type: gcp:dns:ManagedZone
        properties:
          name: peering-zone
          dnsName: services.example.com.
          description: Example private DNS Service Directory zone
          visibility: private
          serviceDirectoryConfig:
            namespace:
              namespaceUrl: ${example.id}
      example:
        type: gcp:servicedirectory:Namespace
        properties:
          namespaceId: example
          location: us-central1
      network:
        type: gcp:compute:Network
        properties:
          name: network
          autoCreateSubnetworks: false
    

    Dns Managed Zone Cloud Logging

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const cloud_logging_enabled_zone = new gcp.dns.ManagedZone("cloud-logging-enabled-zone", {
        name: "cloud-logging-enabled-zone",
        dnsName: "services.example.com.",
        description: "Example cloud logging enabled DNS zone",
        labels: {
            foo: "bar",
        },
        cloudLoggingConfig: {
            enableLogging: true,
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    cloud_logging_enabled_zone = gcp.dns.ManagedZone("cloud-logging-enabled-zone",
        name="cloud-logging-enabled-zone",
        dns_name="services.example.com.",
        description="Example cloud logging enabled DNS zone",
        labels={
            "foo": "bar",
        },
        cloud_logging_config=gcp.dns.ManagedZoneCloudLoggingConfigArgs(
            enable_logging=True,
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dns.NewManagedZone(ctx, "cloud-logging-enabled-zone", &dns.ManagedZoneArgs{
    			Name:        pulumi.String("cloud-logging-enabled-zone"),
    			DnsName:     pulumi.String("services.example.com."),
    			Description: pulumi.String("Example cloud logging enabled DNS zone"),
    			Labels: pulumi.StringMap{
    				"foo": pulumi.String("bar"),
    			},
    			CloudLoggingConfig: &dns.ManagedZoneCloudLoggingConfigArgs{
    				EnableLogging: pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var cloud_logging_enabled_zone = new Gcp.Dns.ManagedZone("cloud-logging-enabled-zone", new()
        {
            Name = "cloud-logging-enabled-zone",
            DnsName = "services.example.com.",
            Description = "Example cloud logging enabled DNS zone",
            Labels = 
            {
                { "foo", "bar" },
            },
            CloudLoggingConfig = new Gcp.Dns.Inputs.ManagedZoneCloudLoggingConfigArgs
            {
                EnableLogging = true,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import com.pulumi.gcp.dns.inputs.ManagedZoneCloudLoggingConfigArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var cloud_logging_enabled_zone = new ManagedZone("cloud-logging-enabled-zone", ManagedZoneArgs.builder()
                .name("cloud-logging-enabled-zone")
                .dnsName("services.example.com.")
                .description("Example cloud logging enabled DNS zone")
                .labels(Map.of("foo", "bar"))
                .cloudLoggingConfig(ManagedZoneCloudLoggingConfigArgs.builder()
                    .enableLogging(true)
                    .build())
                .build());
    
        }
    }
    
    resources:
      cloud-logging-enabled-zone:
        type: gcp:dns:ManagedZone
        properties:
          name: cloud-logging-enabled-zone
          dnsName: services.example.com.
          description: Example cloud logging enabled DNS zone
          labels:
            foo: bar
          cloudLoggingConfig:
            enableLogging: true
    

    Create ManagedZone Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ManagedZone(name: string, args: ManagedZoneArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedZone(resource_name: str,
                    args: ManagedZoneArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ManagedZone(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    dns_name: Optional[str] = None,
                    labels: Optional[Mapping[str, str]] = None,
                    description: Optional[str] = None,
                    dnssec_config: Optional[ManagedZoneDnssecConfigArgs] = None,
                    force_destroy: Optional[bool] = None,
                    forwarding_config: Optional[ManagedZoneForwardingConfigArgs] = None,
                    cloud_logging_config: Optional[ManagedZoneCloudLoggingConfigArgs] = None,
                    name: Optional[str] = None,
                    peering_config: Optional[ManagedZonePeeringConfigArgs] = None,
                    private_visibility_config: Optional[ManagedZonePrivateVisibilityConfigArgs] = None,
                    project: Optional[str] = None,
                    reverse_lookup: Optional[bool] = None,
                    service_directory_config: Optional[ManagedZoneServiceDirectoryConfigArgs] = None,
                    visibility: Optional[str] = None)
    func NewManagedZone(ctx *Context, name string, args ManagedZoneArgs, opts ...ResourceOption) (*ManagedZone, error)
    public ManagedZone(string name, ManagedZoneArgs args, CustomResourceOptions? opts = null)
    public ManagedZone(String name, ManagedZoneArgs args)
    public ManagedZone(String name, ManagedZoneArgs args, CustomResourceOptions options)
    
    type: gcp:dns:ManagedZone
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ManagedZoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ManagedZoneArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ManagedZoneArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedZoneArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedZoneArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var managedZoneResource = new Gcp.Dns.ManagedZone("managedZoneResource", new()
    {
        DnsName = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Description = "string",
        DnssecConfig = new Gcp.Dns.Inputs.ManagedZoneDnssecConfigArgs
        {
            DefaultKeySpecs = new[]
            {
                new Gcp.Dns.Inputs.ManagedZoneDnssecConfigDefaultKeySpecArgs
                {
                    Algorithm = "string",
                    KeyLength = 0,
                    KeyType = "string",
                    Kind = "string",
                },
            },
            Kind = "string",
            NonExistence = "string",
            State = "string",
        },
        ForceDestroy = false,
        ForwardingConfig = new Gcp.Dns.Inputs.ManagedZoneForwardingConfigArgs
        {
            TargetNameServers = new[]
            {
                new Gcp.Dns.Inputs.ManagedZoneForwardingConfigTargetNameServerArgs
                {
                    Ipv4Address = "string",
                    ForwardingPath = "string",
                },
            },
        },
        CloudLoggingConfig = new Gcp.Dns.Inputs.ManagedZoneCloudLoggingConfigArgs
        {
            EnableLogging = false,
        },
        Name = "string",
        PeeringConfig = new Gcp.Dns.Inputs.ManagedZonePeeringConfigArgs
        {
            TargetNetwork = new Gcp.Dns.Inputs.ManagedZonePeeringConfigTargetNetworkArgs
            {
                NetworkUrl = "string",
            },
        },
        PrivateVisibilityConfig = new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigArgs
        {
            GkeClusters = new[]
            {
                new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigGkeClusterArgs
                {
                    GkeClusterName = "string",
                },
            },
            Networks = new[]
            {
                new Gcp.Dns.Inputs.ManagedZonePrivateVisibilityConfigNetworkArgs
                {
                    NetworkUrl = "string",
                },
            },
        },
        Project = "string",
        ReverseLookup = false,
        ServiceDirectoryConfig = new Gcp.Dns.Inputs.ManagedZoneServiceDirectoryConfigArgs
        {
            Namespace = new Gcp.Dns.Inputs.ManagedZoneServiceDirectoryConfigNamespaceArgs
            {
                NamespaceUrl = "string",
            },
        },
        Visibility = "string",
    });
    
    example, err := dns.NewManagedZone(ctx, "managedZoneResource", &dns.ManagedZoneArgs{
    	DnsName: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Description: pulumi.String("string"),
    	DnssecConfig: &dns.ManagedZoneDnssecConfigArgs{
    		DefaultKeySpecs: dns.ManagedZoneDnssecConfigDefaultKeySpecArray{
    			&dns.ManagedZoneDnssecConfigDefaultKeySpecArgs{
    				Algorithm: pulumi.String("string"),
    				KeyLength: pulumi.Int(0),
    				KeyType:   pulumi.String("string"),
    				Kind:      pulumi.String("string"),
    			},
    		},
    		Kind:         pulumi.String("string"),
    		NonExistence: pulumi.String("string"),
    		State:        pulumi.String("string"),
    	},
    	ForceDestroy: pulumi.Bool(false),
    	ForwardingConfig: &dns.ManagedZoneForwardingConfigArgs{
    		TargetNameServers: dns.ManagedZoneForwardingConfigTargetNameServerArray{
    			&dns.ManagedZoneForwardingConfigTargetNameServerArgs{
    				Ipv4Address:    pulumi.String("string"),
    				ForwardingPath: pulumi.String("string"),
    			},
    		},
    	},
    	CloudLoggingConfig: &dns.ManagedZoneCloudLoggingConfigArgs{
    		EnableLogging: pulumi.Bool(false),
    	},
    	Name: pulumi.String("string"),
    	PeeringConfig: &dns.ManagedZonePeeringConfigArgs{
    		TargetNetwork: &dns.ManagedZonePeeringConfigTargetNetworkArgs{
    			NetworkUrl: pulumi.String("string"),
    		},
    	},
    	PrivateVisibilityConfig: &dns.ManagedZonePrivateVisibilityConfigArgs{
    		GkeClusters: dns.ManagedZonePrivateVisibilityConfigGkeClusterArray{
    			&dns.ManagedZonePrivateVisibilityConfigGkeClusterArgs{
    				GkeClusterName: pulumi.String("string"),
    			},
    		},
    		Networks: dns.ManagedZonePrivateVisibilityConfigNetworkArray{
    			&dns.ManagedZonePrivateVisibilityConfigNetworkArgs{
    				NetworkUrl: pulumi.String("string"),
    			},
    		},
    	},
    	Project:       pulumi.String("string"),
    	ReverseLookup: pulumi.Bool(false),
    	ServiceDirectoryConfig: &dns.ManagedZoneServiceDirectoryConfigArgs{
    		Namespace: &dns.ManagedZoneServiceDirectoryConfigNamespaceArgs{
    			NamespaceUrl: pulumi.String("string"),
    		},
    	},
    	Visibility: pulumi.String("string"),
    })
    
    var managedZoneResource = new ManagedZone("managedZoneResource", ManagedZoneArgs.builder()
        .dnsName("string")
        .labels(Map.of("string", "string"))
        .description("string")
        .dnssecConfig(ManagedZoneDnssecConfigArgs.builder()
            .defaultKeySpecs(ManagedZoneDnssecConfigDefaultKeySpecArgs.builder()
                .algorithm("string")
                .keyLength(0)
                .keyType("string")
                .kind("string")
                .build())
            .kind("string")
            .nonExistence("string")
            .state("string")
            .build())
        .forceDestroy(false)
        .forwardingConfig(ManagedZoneForwardingConfigArgs.builder()
            .targetNameServers(ManagedZoneForwardingConfigTargetNameServerArgs.builder()
                .ipv4Address("string")
                .forwardingPath("string")
                .build())
            .build())
        .cloudLoggingConfig(ManagedZoneCloudLoggingConfigArgs.builder()
            .enableLogging(false)
            .build())
        .name("string")
        .peeringConfig(ManagedZonePeeringConfigArgs.builder()
            .targetNetwork(ManagedZonePeeringConfigTargetNetworkArgs.builder()
                .networkUrl("string")
                .build())
            .build())
        .privateVisibilityConfig(ManagedZonePrivateVisibilityConfigArgs.builder()
            .gkeClusters(ManagedZonePrivateVisibilityConfigGkeClusterArgs.builder()
                .gkeClusterName("string")
                .build())
            .networks(ManagedZonePrivateVisibilityConfigNetworkArgs.builder()
                .networkUrl("string")
                .build())
            .build())
        .project("string")
        .reverseLookup(false)
        .serviceDirectoryConfig(ManagedZoneServiceDirectoryConfigArgs.builder()
            .namespace(ManagedZoneServiceDirectoryConfigNamespaceArgs.builder()
                .namespaceUrl("string")
                .build())
            .build())
        .visibility("string")
        .build());
    
    managed_zone_resource = gcp.dns.ManagedZone("managedZoneResource",
        dns_name="string",
        labels={
            "string": "string",
        },
        description="string",
        dnssec_config=gcp.dns.ManagedZoneDnssecConfigArgs(
            default_key_specs=[gcp.dns.ManagedZoneDnssecConfigDefaultKeySpecArgs(
                algorithm="string",
                key_length=0,
                key_type="string",
                kind="string",
            )],
            kind="string",
            non_existence="string",
            state="string",
        ),
        force_destroy=False,
        forwarding_config=gcp.dns.ManagedZoneForwardingConfigArgs(
            target_name_servers=[gcp.dns.ManagedZoneForwardingConfigTargetNameServerArgs(
                ipv4_address="string",
                forwarding_path="string",
            )],
        ),
        cloud_logging_config=gcp.dns.ManagedZoneCloudLoggingConfigArgs(
            enable_logging=False,
        ),
        name="string",
        peering_config=gcp.dns.ManagedZonePeeringConfigArgs(
            target_network=gcp.dns.ManagedZonePeeringConfigTargetNetworkArgs(
                network_url="string",
            ),
        ),
        private_visibility_config=gcp.dns.ManagedZonePrivateVisibilityConfigArgs(
            gke_clusters=[gcp.dns.ManagedZonePrivateVisibilityConfigGkeClusterArgs(
                gke_cluster_name="string",
            )],
            networks=[gcp.dns.ManagedZonePrivateVisibilityConfigNetworkArgs(
                network_url="string",
            )],
        ),
        project="string",
        reverse_lookup=False,
        service_directory_config=gcp.dns.ManagedZoneServiceDirectoryConfigArgs(
            namespace=gcp.dns.ManagedZoneServiceDirectoryConfigNamespaceArgs(
                namespace_url="string",
            ),
        ),
        visibility="string")
    
    const managedZoneResource = new gcp.dns.ManagedZone("managedZoneResource", {
        dnsName: "string",
        labels: {
            string: "string",
        },
        description: "string",
        dnssecConfig: {
            defaultKeySpecs: [{
                algorithm: "string",
                keyLength: 0,
                keyType: "string",
                kind: "string",
            }],
            kind: "string",
            nonExistence: "string",
            state: "string",
        },
        forceDestroy: false,
        forwardingConfig: {
            targetNameServers: [{
                ipv4Address: "string",
                forwardingPath: "string",
            }],
        },
        cloudLoggingConfig: {
            enableLogging: false,
        },
        name: "string",
        peeringConfig: {
            targetNetwork: {
                networkUrl: "string",
            },
        },
        privateVisibilityConfig: {
            gkeClusters: [{
                gkeClusterName: "string",
            }],
            networks: [{
                networkUrl: "string",
            }],
        },
        project: "string",
        reverseLookup: false,
        serviceDirectoryConfig: {
            namespace: {
                namespaceUrl: "string",
            },
        },
        visibility: "string",
    });
    
    type: gcp:dns:ManagedZone
    properties:
        cloudLoggingConfig:
            enableLogging: false
        description: string
        dnsName: string
        dnssecConfig:
            defaultKeySpecs:
                - algorithm: string
                  keyLength: 0
                  keyType: string
                  kind: string
            kind: string
            nonExistence: string
            state: string
        forceDestroy: false
        forwardingConfig:
            targetNameServers:
                - forwardingPath: string
                  ipv4Address: string
        labels:
            string: string
        name: string
        peeringConfig:
            targetNetwork:
                networkUrl: string
        privateVisibilityConfig:
            gkeClusters:
                - gkeClusterName: string
            networks:
                - networkUrl: string
        project: string
        reverseLookup: false
        serviceDirectoryConfig:
            namespace:
                namespaceUrl: string
        visibility: string
    

    ManagedZone Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ManagedZone resource accepts the following input properties:

    DnsName string
    The DNS name of this managed zone, for instance "example.com.".
    CloudLoggingConfig ManagedZoneCloudLoggingConfig
    Cloud logging configuration Structure is documented below.
    Description string
    A textual description field. Defaults to 'Managed by Pulumi'.
    DnssecConfig ManagedZoneDnssecConfig
    DNSSEC configuration Structure is documented below.
    ForceDestroy bool
    Set this true to delete all records in the zone.
    ForwardingConfig ManagedZoneForwardingConfig
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    Labels Dictionary<string, string>

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    Name string
    User assigned name for this resource. Must be unique within the project.


    PeeringConfig ManagedZonePeeringConfig
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    PrivateVisibilityConfig ManagedZonePrivateVisibilityConfig
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ReverseLookup bool
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    ServiceDirectoryConfig ManagedZoneServiceDirectoryConfig
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    Visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    DnsName string
    The DNS name of this managed zone, for instance "example.com.".
    CloudLoggingConfig ManagedZoneCloudLoggingConfigArgs
    Cloud logging configuration Structure is documented below.
    Description string
    A textual description field. Defaults to 'Managed by Pulumi'.
    DnssecConfig ManagedZoneDnssecConfigArgs
    DNSSEC configuration Structure is documented below.
    ForceDestroy bool
    Set this true to delete all records in the zone.
    ForwardingConfig ManagedZoneForwardingConfigArgs
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    Labels map[string]string

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    Name string
    User assigned name for this resource. Must be unique within the project.


    PeeringConfig ManagedZonePeeringConfigArgs
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    PrivateVisibilityConfig ManagedZonePrivateVisibilityConfigArgs
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ReverseLookup bool
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    ServiceDirectoryConfig ManagedZoneServiceDirectoryConfigArgs
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    Visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    dnsName String
    The DNS name of this managed zone, for instance "example.com.".
    cloudLoggingConfig ManagedZoneCloudLoggingConfig
    Cloud logging configuration Structure is documented below.
    description String
    A textual description field. Defaults to 'Managed by Pulumi'.
    dnssecConfig ManagedZoneDnssecConfig
    DNSSEC configuration Structure is documented below.
    forceDestroy Boolean
    Set this true to delete all records in the zone.
    forwardingConfig ManagedZoneForwardingConfig
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels Map<String,String>

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name String
    User assigned name for this resource. Must be unique within the project.


    peeringConfig ManagedZonePeeringConfig
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    privateVisibilityConfig ManagedZonePrivateVisibilityConfig
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    reverseLookup Boolean
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    serviceDirectoryConfig ManagedZoneServiceDirectoryConfig
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility String
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    dnsName string
    The DNS name of this managed zone, for instance "example.com.".
    cloudLoggingConfig ManagedZoneCloudLoggingConfig
    Cloud logging configuration Structure is documented below.
    description string
    A textual description field. Defaults to 'Managed by Pulumi'.
    dnssecConfig ManagedZoneDnssecConfig
    DNSSEC configuration Structure is documented below.
    forceDestroy boolean
    Set this true to delete all records in the zone.
    forwardingConfig ManagedZoneForwardingConfig
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels {[key: string]: string}

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name string
    User assigned name for this resource. Must be unique within the project.


    peeringConfig ManagedZonePeeringConfig
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    privateVisibilityConfig ManagedZonePrivateVisibilityConfig
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    reverseLookup boolean
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    serviceDirectoryConfig ManagedZoneServiceDirectoryConfig
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    dns_name str
    The DNS name of this managed zone, for instance "example.com.".
    cloud_logging_config ManagedZoneCloudLoggingConfigArgs
    Cloud logging configuration Structure is documented below.
    description str
    A textual description field. Defaults to 'Managed by Pulumi'.
    dnssec_config ManagedZoneDnssecConfigArgs
    DNSSEC configuration Structure is documented below.
    force_destroy bool
    Set this true to delete all records in the zone.
    forwarding_config ManagedZoneForwardingConfigArgs
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels Mapping[str, str]

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name str
    User assigned name for this resource. Must be unique within the project.


    peering_config ManagedZonePeeringConfigArgs
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    private_visibility_config ManagedZonePrivateVisibilityConfigArgs
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    reverse_lookup bool
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    service_directory_config ManagedZoneServiceDirectoryConfigArgs
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility str
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    dnsName String
    The DNS name of this managed zone, for instance "example.com.".
    cloudLoggingConfig Property Map
    Cloud logging configuration Structure is documented below.
    description String
    A textual description field. Defaults to 'Managed by Pulumi'.
    dnssecConfig Property Map
    DNSSEC configuration Structure is documented below.
    forceDestroy Boolean
    Set this true to delete all records in the zone.
    forwardingConfig Property Map
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels Map<String>

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    name String
    User assigned name for this resource. Must be unique within the project.


    peeringConfig Property Map
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    privateVisibilityConfig Property Map
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    reverseLookup Boolean
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    serviceDirectoryConfig Property Map
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility String
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ManagedZone resource produces the following output properties:

    CreationTime string
    The time that this resource was created on the server. This is in RFC3339 text format.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedZoneId string
    Unique identifier for the resource; defined by the server.
    NameServers List<string>
    Delegate your managed_zone to these virtual name servers; defined by the server
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    CreationTime string
    The time that this resource was created on the server. This is in RFC3339 text format.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    ManagedZoneId string
    Unique identifier for the resource; defined by the server.
    NameServers []string
    Delegate your managed_zone to these virtual name servers; defined by the server
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    creationTime String
    The time that this resource was created on the server. This is in RFC3339 text format.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    managedZoneId String
    Unique identifier for the resource; defined by the server.
    nameServers List<String>
    Delegate your managed_zone to these virtual name servers; defined by the server
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    creationTime string
    The time that this resource was created on the server. This is in RFC3339 text format.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    managedZoneId string
    Unique identifier for the resource; defined by the server.
    nameServers string[]
    Delegate your managed_zone to these virtual name servers; defined by the server
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    creation_time str
    The time that this resource was created on the server. This is in RFC3339 text format.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    managed_zone_id str
    Unique identifier for the resource; defined by the server.
    name_servers Sequence[str]
    Delegate your managed_zone to these virtual name servers; defined by the server
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    creationTime String
    The time that this resource was created on the server. This is in RFC3339 text format.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    managedZoneId String
    Unique identifier for the resource; defined by the server.
    nameServers List<String>
    Delegate your managed_zone to these virtual name servers; defined by the server
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.

    Look up Existing ManagedZone Resource

    Get an existing ManagedZone resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ManagedZoneState, opts?: CustomResourceOptions): ManagedZone
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cloud_logging_config: Optional[ManagedZoneCloudLoggingConfigArgs] = None,
            creation_time: Optional[str] = None,
            description: Optional[str] = None,
            dns_name: Optional[str] = None,
            dnssec_config: Optional[ManagedZoneDnssecConfigArgs] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            force_destroy: Optional[bool] = None,
            forwarding_config: Optional[ManagedZoneForwardingConfigArgs] = None,
            labels: Optional[Mapping[str, str]] = None,
            managed_zone_id: Optional[str] = None,
            name: Optional[str] = None,
            name_servers: Optional[Sequence[str]] = None,
            peering_config: Optional[ManagedZonePeeringConfigArgs] = None,
            private_visibility_config: Optional[ManagedZonePrivateVisibilityConfigArgs] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            reverse_lookup: Optional[bool] = None,
            service_directory_config: Optional[ManagedZoneServiceDirectoryConfigArgs] = None,
            visibility: Optional[str] = None) -> ManagedZone
    func GetManagedZone(ctx *Context, name string, id IDInput, state *ManagedZoneState, opts ...ResourceOption) (*ManagedZone, error)
    public static ManagedZone Get(string name, Input<string> id, ManagedZoneState? state, CustomResourceOptions? opts = null)
    public static ManagedZone get(String name, Output<String> id, ManagedZoneState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CloudLoggingConfig ManagedZoneCloudLoggingConfig
    Cloud logging configuration Structure is documented below.
    CreationTime string
    The time that this resource was created on the server. This is in RFC3339 text format.
    Description string
    A textual description field. Defaults to 'Managed by Pulumi'.
    DnsName string
    The DNS name of this managed zone, for instance "example.com.".
    DnssecConfig ManagedZoneDnssecConfig
    DNSSEC configuration Structure is documented below.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    ForceDestroy bool
    Set this true to delete all records in the zone.
    ForwardingConfig ManagedZoneForwardingConfig
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    Labels Dictionary<string, string>

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    ManagedZoneId string
    Unique identifier for the resource; defined by the server.
    Name string
    User assigned name for this resource. Must be unique within the project.


    NameServers List<string>
    Delegate your managed_zone to these virtual name servers; defined by the server
    PeeringConfig ManagedZonePeeringConfig
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    PrivateVisibilityConfig ManagedZonePrivateVisibilityConfig
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    ReverseLookup bool
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    ServiceDirectoryConfig ManagedZoneServiceDirectoryConfig
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    Visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    CloudLoggingConfig ManagedZoneCloudLoggingConfigArgs
    Cloud logging configuration Structure is documented below.
    CreationTime string
    The time that this resource was created on the server. This is in RFC3339 text format.
    Description string
    A textual description field. Defaults to 'Managed by Pulumi'.
    DnsName string
    The DNS name of this managed zone, for instance "example.com.".
    DnssecConfig ManagedZoneDnssecConfigArgs
    DNSSEC configuration Structure is documented below.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    ForceDestroy bool
    Set this true to delete all records in the zone.
    ForwardingConfig ManagedZoneForwardingConfigArgs
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    Labels map[string]string

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    ManagedZoneId string
    Unique identifier for the resource; defined by the server.
    Name string
    User assigned name for this resource. Must be unique within the project.


    NameServers []string
    Delegate your managed_zone to these virtual name servers; defined by the server
    PeeringConfig ManagedZonePeeringConfigArgs
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    PrivateVisibilityConfig ManagedZonePrivateVisibilityConfigArgs
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    ReverseLookup bool
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    ServiceDirectoryConfig ManagedZoneServiceDirectoryConfigArgs
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    Visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    cloudLoggingConfig ManagedZoneCloudLoggingConfig
    Cloud logging configuration Structure is documented below.
    creationTime String
    The time that this resource was created on the server. This is in RFC3339 text format.
    description String
    A textual description field. Defaults to 'Managed by Pulumi'.
    dnsName String
    The DNS name of this managed zone, for instance "example.com.".
    dnssecConfig ManagedZoneDnssecConfig
    DNSSEC configuration Structure is documented below.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    forceDestroy Boolean
    Set this true to delete all records in the zone.
    forwardingConfig ManagedZoneForwardingConfig
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels Map<String,String>

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    managedZoneId String
    Unique identifier for the resource; defined by the server.
    name String
    User assigned name for this resource. Must be unique within the project.


    nameServers List<String>
    Delegate your managed_zone to these virtual name servers; defined by the server
    peeringConfig ManagedZonePeeringConfig
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    privateVisibilityConfig ManagedZonePrivateVisibilityConfig
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    reverseLookup Boolean
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    serviceDirectoryConfig ManagedZoneServiceDirectoryConfig
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility String
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    cloudLoggingConfig ManagedZoneCloudLoggingConfig
    Cloud logging configuration Structure is documented below.
    creationTime string
    The time that this resource was created on the server. This is in RFC3339 text format.
    description string
    A textual description field. Defaults to 'Managed by Pulumi'.
    dnsName string
    The DNS name of this managed zone, for instance "example.com.".
    dnssecConfig ManagedZoneDnssecConfig
    DNSSEC configuration Structure is documented below.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    forceDestroy boolean
    Set this true to delete all records in the zone.
    forwardingConfig ManagedZoneForwardingConfig
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels {[key: string]: string}

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    managedZoneId string
    Unique identifier for the resource; defined by the server.
    name string
    User assigned name for this resource. Must be unique within the project.


    nameServers string[]
    Delegate your managed_zone to these virtual name servers; defined by the server
    peeringConfig ManagedZonePeeringConfig
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    privateVisibilityConfig ManagedZonePrivateVisibilityConfig
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    reverseLookup boolean
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    serviceDirectoryConfig ManagedZoneServiceDirectoryConfig
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility string
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    cloud_logging_config ManagedZoneCloudLoggingConfigArgs
    Cloud logging configuration Structure is documented below.
    creation_time str
    The time that this resource was created on the server. This is in RFC3339 text format.
    description str
    A textual description field. Defaults to 'Managed by Pulumi'.
    dns_name str
    The DNS name of this managed zone, for instance "example.com.".
    dnssec_config ManagedZoneDnssecConfigArgs
    DNSSEC configuration Structure is documented below.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    force_destroy bool
    Set this true to delete all records in the zone.
    forwarding_config ManagedZoneForwardingConfigArgs
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels Mapping[str, str]

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    managed_zone_id str
    Unique identifier for the resource; defined by the server.
    name str
    User assigned name for this resource. Must be unique within the project.


    name_servers Sequence[str]
    Delegate your managed_zone to these virtual name servers; defined by the server
    peering_config ManagedZonePeeringConfigArgs
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    private_visibility_config ManagedZonePrivateVisibilityConfigArgs
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    reverse_lookup bool
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    service_directory_config ManagedZoneServiceDirectoryConfigArgs
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility str
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.
    cloudLoggingConfig Property Map
    Cloud logging configuration Structure is documented below.
    creationTime String
    The time that this resource was created on the server. This is in RFC3339 text format.
    description String
    A textual description field. Defaults to 'Managed by Pulumi'.
    dnsName String
    The DNS name of this managed zone, for instance "example.com.".
    dnssecConfig Property Map
    DNSSEC configuration Structure is documented below.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    forceDestroy Boolean
    Set this true to delete all records in the zone.
    forwardingConfig Property Map
    The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to. Structure is documented below.
    labels Map<String>

    A set of key/value label pairs to assign to this ManagedZone.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

    managedZoneId String
    Unique identifier for the resource; defined by the server.
    name String
    User assigned name for this resource. Must be unique within the project.


    nameServers List<String>
    Delegate your managed_zone to these virtual name servers; defined by the server
    peeringConfig Property Map
    The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. Structure is documented below.
    privateVisibilityConfig Property Map
    For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. At least one of gke_clusters or networks must be specified. Structure is documented below.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    reverseLookup Boolean
    Specifies if this is a managed reverse lookup zone. If true, Cloud DNS will resolve reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
    serviceDirectoryConfig Property Map
    The presence of this field indicates that this zone is backed by Service Directory. The value of this field contains information related to the namespace associated with the zone. Structure is documented below.
    visibility String
    The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. Default value is public. Possible values are: private, public.

    Supporting Types

    ManagedZoneCloudLoggingConfig, ManagedZoneCloudLoggingConfigArgs

    EnableLogging bool
    If set, enable query logging for this ManagedZone. False by default, making logging opt-in.
    EnableLogging bool
    If set, enable query logging for this ManagedZone. False by default, making logging opt-in.
    enableLogging Boolean
    If set, enable query logging for this ManagedZone. False by default, making logging opt-in.
    enableLogging boolean
    If set, enable query logging for this ManagedZone. False by default, making logging opt-in.
    enable_logging bool
    If set, enable query logging for this ManagedZone. False by default, making logging opt-in.
    enableLogging Boolean
    If set, enable query logging for this ManagedZone. False by default, making logging opt-in.

    ManagedZoneDnssecConfig, ManagedZoneDnssecConfigArgs

    DefaultKeySpecs List<ManagedZoneDnssecConfigDefaultKeySpec>
    Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default_key_specs can only be updated when the state is off. Structure is documented below.
    Kind string
    Identifies what kind of resource this is
    NonExistence string
    Specifies the mechanism used to provide authenticated denial-of-existence responses. non_existence can only be updated when the state is off. Possible values are: nsec, nsec3.
    State string
    Specifies whether DNSSEC is enabled, and what mode it is in Possible values are: off, on, transfer.
    DefaultKeySpecs []ManagedZoneDnssecConfigDefaultKeySpec
    Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default_key_specs can only be updated when the state is off. Structure is documented below.
    Kind string
    Identifies what kind of resource this is
    NonExistence string
    Specifies the mechanism used to provide authenticated denial-of-existence responses. non_existence can only be updated when the state is off. Possible values are: nsec, nsec3.
    State string
    Specifies whether DNSSEC is enabled, and what mode it is in Possible values are: off, on, transfer.
    defaultKeySpecs List<ManagedZoneDnssecConfigDefaultKeySpec>
    Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default_key_specs can only be updated when the state is off. Structure is documented below.
    kind String
    Identifies what kind of resource this is
    nonExistence String
    Specifies the mechanism used to provide authenticated denial-of-existence responses. non_existence can only be updated when the state is off. Possible values are: nsec, nsec3.
    state String
    Specifies whether DNSSEC is enabled, and what mode it is in Possible values are: off, on, transfer.
    defaultKeySpecs ManagedZoneDnssecConfigDefaultKeySpec[]
    Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default_key_specs can only be updated when the state is off. Structure is documented below.
    kind string
    Identifies what kind of resource this is
    nonExistence string
    Specifies the mechanism used to provide authenticated denial-of-existence responses. non_existence can only be updated when the state is off. Possible values are: nsec, nsec3.
    state string
    Specifies whether DNSSEC is enabled, and what mode it is in Possible values are: off, on, transfer.
    default_key_specs Sequence[ManagedZoneDnssecConfigDefaultKeySpec]
    Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default_key_specs can only be updated when the state is off. Structure is documented below.
    kind str
    Identifies what kind of resource this is
    non_existence str
    Specifies the mechanism used to provide authenticated denial-of-existence responses. non_existence can only be updated when the state is off. Possible values are: nsec, nsec3.
    state str
    Specifies whether DNSSEC is enabled, and what mode it is in Possible values are: off, on, transfer.
    defaultKeySpecs List<Property Map>
    Specifies parameters that will be used for generating initial DnsKeys for this ManagedZone. If you provide a spec for keySigning or zoneSigning, you must also provide one for the other. default_key_specs can only be updated when the state is off. Structure is documented below.
    kind String
    Identifies what kind of resource this is
    nonExistence String
    Specifies the mechanism used to provide authenticated denial-of-existence responses. non_existence can only be updated when the state is off. Possible values are: nsec, nsec3.
    state String
    Specifies whether DNSSEC is enabled, and what mode it is in Possible values are: off, on, transfer.

    ManagedZoneDnssecConfigDefaultKeySpec, ManagedZoneDnssecConfigDefaultKeySpecArgs

    Algorithm string
    String mnemonic specifying the DNSSEC algorithm of this key Possible values are: ecdsap256sha256, ecdsap384sha384, rsasha1, rsasha256, rsasha512.
    KeyLength int
    Length of the keys in bits
    KeyType string
    Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Possible values are: keySigning, zoneSigning.
    Kind string
    Identifies what kind of resource this is
    Algorithm string
    String mnemonic specifying the DNSSEC algorithm of this key Possible values are: ecdsap256sha256, ecdsap384sha384, rsasha1, rsasha256, rsasha512.
    KeyLength int
    Length of the keys in bits
    KeyType string
    Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Possible values are: keySigning, zoneSigning.
    Kind string
    Identifies what kind of resource this is
    algorithm String
    String mnemonic specifying the DNSSEC algorithm of this key Possible values are: ecdsap256sha256, ecdsap384sha384, rsasha1, rsasha256, rsasha512.
    keyLength Integer
    Length of the keys in bits
    keyType String
    Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Possible values are: keySigning, zoneSigning.
    kind String
    Identifies what kind of resource this is
    algorithm string
    String mnemonic specifying the DNSSEC algorithm of this key Possible values are: ecdsap256sha256, ecdsap384sha384, rsasha1, rsasha256, rsasha512.
    keyLength number
    Length of the keys in bits
    keyType string
    Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Possible values are: keySigning, zoneSigning.
    kind string
    Identifies what kind of resource this is
    algorithm str
    String mnemonic specifying the DNSSEC algorithm of this key Possible values are: ecdsap256sha256, ecdsap384sha384, rsasha1, rsasha256, rsasha512.
    key_length int
    Length of the keys in bits
    key_type str
    Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Possible values are: keySigning, zoneSigning.
    kind str
    Identifies what kind of resource this is
    algorithm String
    String mnemonic specifying the DNSSEC algorithm of this key Possible values are: ecdsap256sha256, ecdsap384sha384, rsasha1, rsasha256, rsasha512.
    keyLength Number
    Length of the keys in bits
    keyType String
    Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, will only be used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and will be used to sign all other types of resource record sets. Possible values are: keySigning, zoneSigning.
    kind String
    Identifies what kind of resource this is

    ManagedZoneForwardingConfig, ManagedZoneForwardingConfigArgs

    TargetNameServers List<ManagedZoneForwardingConfigTargetNameServer>
    List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. Structure is documented below.
    TargetNameServers []ManagedZoneForwardingConfigTargetNameServer
    List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. Structure is documented below.
    targetNameServers List<ManagedZoneForwardingConfigTargetNameServer>
    List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. Structure is documented below.
    targetNameServers ManagedZoneForwardingConfigTargetNameServer[]
    List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. Structure is documented below.
    target_name_servers Sequence[ManagedZoneForwardingConfigTargetNameServer]
    List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. Structure is documented below.
    targetNameServers List<Property Map>
    List of target name servers to forward to. Cloud DNS will select the best available name server if more than one target is given. Structure is documented below.

    ManagedZoneForwardingConfigTargetNameServer, ManagedZoneForwardingConfigTargetNameServerArgs

    Ipv4Address string
    IPv4 address of a target name server.
    ForwardingPath string
    Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are: default, private.
    Ipv4Address string
    IPv4 address of a target name server.
    ForwardingPath string
    Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are: default, private.
    ipv4Address String
    IPv4 address of a target name server.
    forwardingPath String
    Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are: default, private.
    ipv4Address string
    IPv4 address of a target name server.
    forwardingPath string
    Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are: default, private.
    ipv4_address str
    IPv4 address of a target name server.
    forwarding_path str
    Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are: default, private.
    ipv4Address String
    IPv4 address of a target name server.
    forwardingPath String
    Forwarding path for this TargetNameServer. If unset or default Cloud DNS will make forwarding decision based on address ranges, i.e. RFC1918 addresses go to the VPC, Non-RFC1918 addresses go to the Internet. When set to private, Cloud DNS will always send queries through VPC for this target Possible values are: default, private.

    ManagedZonePeeringConfig, ManagedZonePeeringConfigArgs

    TargetNetwork ManagedZonePeeringConfigTargetNetwork
    The network with which to peer. Structure is documented below.
    TargetNetwork ManagedZonePeeringConfigTargetNetwork
    The network with which to peer. Structure is documented below.
    targetNetwork ManagedZonePeeringConfigTargetNetwork
    The network with which to peer. Structure is documented below.
    targetNetwork ManagedZonePeeringConfigTargetNetwork
    The network with which to peer. Structure is documented below.
    target_network ManagedZonePeeringConfigTargetNetwork
    The network with which to peer. Structure is documented below.
    targetNetwork Property Map
    The network with which to peer. Structure is documented below.

    ManagedZonePeeringConfigTargetNetwork, ManagedZonePeeringConfigTargetNetworkArgs

    NetworkUrl string
    The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    NetworkUrl string
    The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    networkUrl String
    The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    networkUrl string
    The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    network_url str
    The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    networkUrl String
    The id or fully qualified URL of the VPC network to forward queries to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

    ManagedZonePrivateVisibilityConfig, ManagedZonePrivateVisibilityConfigArgs

    GkeClusters List<ManagedZonePrivateVisibilityConfigGkeCluster>
    The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.
    Networks List<ManagedZonePrivateVisibilityConfigNetwork>
    GkeClusters []ManagedZonePrivateVisibilityConfigGkeCluster
    The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.
    Networks []ManagedZonePrivateVisibilityConfigNetwork
    gkeClusters List<ManagedZonePrivateVisibilityConfigGkeCluster>
    The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.
    networks List<ManagedZonePrivateVisibilityConfigNetwork>
    gkeClusters ManagedZonePrivateVisibilityConfigGkeCluster[]
    The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.
    networks ManagedZonePrivateVisibilityConfigNetwork[]
    gke_clusters Sequence[ManagedZonePrivateVisibilityConfigGkeCluster]
    The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.
    networks Sequence[ManagedZonePrivateVisibilityConfigNetwork]
    gkeClusters List<Property Map>
    The list of Google Kubernetes Engine clusters that can see this zone. Structure is documented below.
    networks List<Property Map>

    ManagedZonePrivateVisibilityConfigGkeCluster, ManagedZonePrivateVisibilityConfigGkeClusterArgs

    GkeClusterName string
    The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*
    GkeClusterName string
    The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*
    gkeClusterName String
    The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*
    gkeClusterName string
    The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*
    gke_cluster_name str
    The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*
    gkeClusterName String
    The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like projects/*/locations/*/clusters/*

    ManagedZonePrivateVisibilityConfigNetwork, ManagedZonePrivateVisibilityConfigNetworkArgs

    NetworkUrl string
    The id or fully qualified URL of the VPC network to bind to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    NetworkUrl string
    The id or fully qualified URL of the VPC network to bind to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    networkUrl String
    The id or fully qualified URL of the VPC network to bind to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    networkUrl string
    The id or fully qualified URL of the VPC network to bind to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    network_url str
    The id or fully qualified URL of the VPC network to bind to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
    networkUrl String
    The id or fully qualified URL of the VPC network to bind to. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}

    ManagedZoneServiceDirectoryConfig, ManagedZoneServiceDirectoryConfigArgs

    Namespace ManagedZoneServiceDirectoryConfigNamespace
    The namespace associated with the zone. Structure is documented below.
    Namespace ManagedZoneServiceDirectoryConfigNamespace
    The namespace associated with the zone. Structure is documented below.
    namespace ManagedZoneServiceDirectoryConfigNamespace
    The namespace associated with the zone. Structure is documented below.
    namespace ManagedZoneServiceDirectoryConfigNamespace
    The namespace associated with the zone. Structure is documented below.
    namespace ManagedZoneServiceDirectoryConfigNamespace
    The namespace associated with the zone. Structure is documented below.
    namespace Property Map
    The namespace associated with the zone. Structure is documented below.

    ManagedZoneServiceDirectoryConfigNamespace, ManagedZoneServiceDirectoryConfigNamespaceArgs

    NamespaceUrl string
    The fully qualified or partial URL of the service directory namespace that should be associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace_id} or simply projects/{project}/locations/{location}/namespaces/{namespace_id} Ignored for public visibility zones.
    NamespaceUrl string
    The fully qualified or partial URL of the service directory namespace that should be associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace_id} or simply projects/{project}/locations/{location}/namespaces/{namespace_id} Ignored for public visibility zones.
    namespaceUrl String
    The fully qualified or partial URL of the service directory namespace that should be associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace_id} or simply projects/{project}/locations/{location}/namespaces/{namespace_id} Ignored for public visibility zones.
    namespaceUrl string
    The fully qualified or partial URL of the service directory namespace that should be associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace_id} or simply projects/{project}/locations/{location}/namespaces/{namespace_id} Ignored for public visibility zones.
    namespace_url str
    The fully qualified or partial URL of the service directory namespace that should be associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace_id} or simply projects/{project}/locations/{location}/namespaces/{namespace_id} Ignored for public visibility zones.
    namespaceUrl String
    The fully qualified or partial URL of the service directory namespace that should be associated with the zone. This should be formatted like https://servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace_id} or simply projects/{project}/locations/{location}/namespaces/{namespace_id} Ignored for public visibility zones.

    Import

    ManagedZone can be imported using any of these accepted formats:

    • projects/{{project}}/managedZones/{{name}}

    • {{project}}/{{name}}

    • {{name}}

    When using the pulumi import command, ManagedZone can be imported using one of the formats above. For example:

    $ pulumi import gcp:dns/managedZone:ManagedZone default projects/{{project}}/managedZones/{{name}}
    
    $ pulumi import gcp:dns/managedZone:ManagedZone default {{project}}/{{name}}
    
    $ pulumi import gcp:dns/managedZone:ManagedZone default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi