1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. dns
  5. RecordSet
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.dns.RecordSet

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

    Example Usage

    Binding a DNS name to the ephemeral IP of a new instance:

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const frontendInstance = new gcp.compute.Instance("frontend", {
        networkInterfaces: [{
            accessConfigs: [{}],
            network: "default",
        }],
        name: "frontend",
        machineType: "g1-small",
        zone: "us-central1-b",
        bootDisk: {
            initializeParams: {
                image: "debian-cloud/debian-11",
            },
        },
    });
    const prod = new gcp.dns.ManagedZone("prod", {
        name: "prod-zone",
        dnsName: "prod.mydomain.com.",
    });
    const frontend = new gcp.dns.RecordSet("frontend", {
        name: pulumi.interpolate`frontend.${prod.dnsName}`,
        type: "A",
        ttl: 300,
        managedZone: prod.name,
        rrdatas: [frontendInstance.networkInterfaces.apply(networkInterfaces => networkInterfaces[0].accessConfigs?.[0]?.natIp)],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    frontend_instance = gcp.compute.Instance("frontend",
        network_interfaces=[{
            "access_configs": [{}],
            "network": "default",
        }],
        name="frontend",
        machine_type="g1-small",
        zone="us-central1-b",
        boot_disk={
            "initialize_params": {
                "image": "debian-cloud/debian-11",
            },
        })
    prod = gcp.dns.ManagedZone("prod",
        name="prod-zone",
        dns_name="prod.mydomain.com.")
    frontend = gcp.dns.RecordSet("frontend",
        name=prod.dns_name.apply(lambda dns_name: f"frontend.{dns_name}"),
        type="A",
        ttl=300,
        managed_zone=prod.name,
        rrdatas=[frontend_instance.network_interfaces[0].access_configs[0].nat_ip])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		frontendInstance, err := compute.NewInstance(ctx, "frontend", &compute.InstanceArgs{
    			NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
    				&compute.InstanceNetworkInterfaceArgs{
    					AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
    						&compute.InstanceNetworkInterfaceAccessConfigArgs{},
    					},
    					Network: pulumi.String("default"),
    				},
    			},
    			Name:        pulumi.String("frontend"),
    			MachineType: pulumi.String("g1-small"),
    			Zone:        pulumi.String("us-central1-b"),
    			BootDisk: &compute.InstanceBootDiskArgs{
    				InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
    					Image: pulumi.String("debian-cloud/debian-11"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		prod, err := dns.NewManagedZone(ctx, "prod", &dns.ManagedZoneArgs{
    			Name:    pulumi.String("prod-zone"),
    			DnsName: pulumi.String("prod.mydomain.com."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewRecordSet(ctx, "frontend", &dns.RecordSetArgs{
    			Name: prod.DnsName.ApplyT(func(dnsName string) (string, error) {
    				return fmt.Sprintf("frontend.%v", dnsName), nil
    			}).(pulumi.StringOutput),
    			Type:        pulumi.String("A"),
    			Ttl:         pulumi.Int(300),
    			ManagedZone: prod.Name,
    			Rrdatas: pulumi.StringArray{
    				pulumi.String(frontendInstance.NetworkInterfaces.ApplyT(func(networkInterfaces []compute.InstanceNetworkInterface) (*string, error) {
    					return &networkInterfaces[0].AccessConfigs[0].NatIp, nil
    				}).(pulumi.StringPtrOutput)),
    			},
    		})
    		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 frontendInstance = new Gcp.Compute.Instance("frontend", new()
        {
            NetworkInterfaces = new[]
            {
                new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
                {
                    AccessConfigs = new[]
                    {
                        null,
                    },
                    Network = "default",
                },
            },
            Name = "frontend",
            MachineType = "g1-small",
            Zone = "us-central1-b",
            BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
            {
                InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
                {
                    Image = "debian-cloud/debian-11",
                },
            },
        });
    
        var prod = new Gcp.Dns.ManagedZone("prod", new()
        {
            Name = "prod-zone",
            DnsName = "prod.mydomain.com.",
        });
    
        var frontend = new Gcp.Dns.RecordSet("frontend", new()
        {
            Name = prod.DnsName.Apply(dnsName => $"frontend.{dnsName}"),
            Type = "A",
            Ttl = 300,
            ManagedZone = prod.Name,
            Rrdatas = new[]
            {
                frontendInstance.NetworkInterfaces.Apply(networkInterfaces => networkInterfaces[0].AccessConfigs[0]?.NatIp),
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.Instance;
    import com.pulumi.gcp.compute.InstanceArgs;
    import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
    import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs;
    import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
    import com.pulumi.gcp.dns.ManagedZone;
    import com.pulumi.gcp.dns.ManagedZoneArgs;
    import com.pulumi.gcp.dns.RecordSet;
    import com.pulumi.gcp.dns.RecordSetArgs;
    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 frontendInstance = new Instance("frontendInstance", InstanceArgs.builder()
                .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
                    .accessConfigs()
                    .network("default")
                    .build())
                .name("frontend")
                .machineType("g1-small")
                .zone("us-central1-b")
                .bootDisk(InstanceBootDiskArgs.builder()
                    .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
                        .image("debian-cloud/debian-11")
                        .build())
                    .build())
                .build());
    
            var prod = new ManagedZone("prod", ManagedZoneArgs.builder()
                .name("prod-zone")
                .dnsName("prod.mydomain.com.")
                .build());
    
            var frontend = new RecordSet("frontend", RecordSetArgs.builder()
                .name(prod.dnsName().applyValue(dnsName -> String.format("frontend.%s", dnsName)))
                .type("A")
                .ttl(300)
                .managedZone(prod.name())
                .rrdatas(frontendInstance.networkInterfaces().applyValue(networkInterfaces -> networkInterfaces[0].accessConfigs()[0].natIp()))
                .build());
    
        }
    }
    
    resources:
      frontend:
        type: gcp:dns:RecordSet
        properties:
          name: frontend.${prod.dnsName}
          type: A
          ttl: 300
          managedZone: ${prod.name}
          rrdatas:
            - ${frontendInstance.networkInterfaces[0].accessConfigs[0].natIp}
      frontendInstance:
        type: gcp:compute:Instance
        name: frontend
        properties:
          networkInterfaces:
            - accessConfigs:
                - {}
              network: default
          name: frontend
          machineType: g1-small
          zone: us-central1-b
          bootDisk:
            initializeParams:
              image: debian-cloud/debian-11
      prod:
        type: gcp:dns:ManagedZone
        properties:
          name: prod-zone
          dnsName: prod.mydomain.com.
    

    Adding an A record

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const prod = new gcp.dns.ManagedZone("prod", {
        name: "prod-zone",
        dnsName: "prod.mydomain.com.",
    });
    const a = new gcp.dns.RecordSet("a", {
        name: pulumi.interpolate`backend.${prod.dnsName}`,
        managedZone: prod.name,
        type: "A",
        ttl: 300,
        rrdatas: ["8.8.8.8"],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    prod = gcp.dns.ManagedZone("prod",
        name="prod-zone",
        dns_name="prod.mydomain.com.")
    a = gcp.dns.RecordSet("a",
        name=prod.dns_name.apply(lambda dns_name: f"backend.{dns_name}"),
        managed_zone=prod.name,
        type="A",
        ttl=300,
        rrdatas=["8.8.8.8"])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		prod, err := dns.NewManagedZone(ctx, "prod", &dns.ManagedZoneArgs{
    			Name:    pulumi.String("prod-zone"),
    			DnsName: pulumi.String("prod.mydomain.com."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewRecordSet(ctx, "a", &dns.RecordSetArgs{
    			Name: prod.DnsName.ApplyT(func(dnsName string) (string, error) {
    				return fmt.Sprintf("backend.%v", dnsName), nil
    			}).(pulumi.StringOutput),
    			ManagedZone: prod.Name,
    			Type:        pulumi.String("A"),
    			Ttl:         pulumi.Int(300),
    			Rrdatas: pulumi.StringArray{
    				pulumi.String("8.8.8.8"),
    			},
    		})
    		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 prod = new Gcp.Dns.ManagedZone("prod", new()
        {
            Name = "prod-zone",
            DnsName = "prod.mydomain.com.",
        });
    
        var a = new Gcp.Dns.RecordSet("a", new()
        {
            Name = prod.DnsName.Apply(dnsName => $"backend.{dnsName}"),
            ManagedZone = prod.Name,
            Type = "A",
            Ttl = 300,
            Rrdatas = new[]
            {
                "8.8.8.8",
            },
        });
    
    });
    
    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.RecordSet;
    import com.pulumi.gcp.dns.RecordSetArgs;
    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 prod = new ManagedZone("prod", ManagedZoneArgs.builder()
                .name("prod-zone")
                .dnsName("prod.mydomain.com.")
                .build());
    
            var a = new RecordSet("a", RecordSetArgs.builder()
                .name(prod.dnsName().applyValue(dnsName -> String.format("backend.%s", dnsName)))
                .managedZone(prod.name())
                .type("A")
                .ttl(300)
                .rrdatas("8.8.8.8")
                .build());
    
        }
    }
    
    resources:
      a:
        type: gcp:dns:RecordSet
        properties:
          name: backend.${prod.dnsName}
          managedZone: ${prod.name}
          type: A
          ttl: 300
          rrdatas:
            - 8.8.8.8
      prod:
        type: gcp:dns:ManagedZone
        properties:
          name: prod-zone
          dnsName: prod.mydomain.com.
    

    Adding an MX record

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const prod = new gcp.dns.ManagedZone("prod", {
        name: "prod-zone",
        dnsName: "prod.mydomain.com.",
    });
    const mx = new gcp.dns.RecordSet("mx", {
        name: prod.dnsName,
        managedZone: prod.name,
        type: "MX",
        ttl: 3600,
        rrdatas: [
            "1 aspmx.l.google.com.",
            "5 alt1.aspmx.l.google.com.",
            "5 alt2.aspmx.l.google.com.",
            "10 alt3.aspmx.l.google.com.",
            "10 alt4.aspmx.l.google.com.",
        ],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    prod = gcp.dns.ManagedZone("prod",
        name="prod-zone",
        dns_name="prod.mydomain.com.")
    mx = gcp.dns.RecordSet("mx",
        name=prod.dns_name,
        managed_zone=prod.name,
        type="MX",
        ttl=3600,
        rrdatas=[
            "1 aspmx.l.google.com.",
            "5 alt1.aspmx.l.google.com.",
            "5 alt2.aspmx.l.google.com.",
            "10 alt3.aspmx.l.google.com.",
            "10 alt4.aspmx.l.google.com.",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		prod, err := dns.NewManagedZone(ctx, "prod", &dns.ManagedZoneArgs{
    			Name:    pulumi.String("prod-zone"),
    			DnsName: pulumi.String("prod.mydomain.com."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewRecordSet(ctx, "mx", &dns.RecordSetArgs{
    			Name:        prod.DnsName,
    			ManagedZone: prod.Name,
    			Type:        pulumi.String("MX"),
    			Ttl:         pulumi.Int(3600),
    			Rrdatas: pulumi.StringArray{
    				pulumi.String("1 aspmx.l.google.com."),
    				pulumi.String("5 alt1.aspmx.l.google.com."),
    				pulumi.String("5 alt2.aspmx.l.google.com."),
    				pulumi.String("10 alt3.aspmx.l.google.com."),
    				pulumi.String("10 alt4.aspmx.l.google.com."),
    			},
    		})
    		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 prod = new Gcp.Dns.ManagedZone("prod", new()
        {
            Name = "prod-zone",
            DnsName = "prod.mydomain.com.",
        });
    
        var mx = new Gcp.Dns.RecordSet("mx", new()
        {
            Name = prod.DnsName,
            ManagedZone = prod.Name,
            Type = "MX",
            Ttl = 3600,
            Rrdatas = new[]
            {
                "1 aspmx.l.google.com.",
                "5 alt1.aspmx.l.google.com.",
                "5 alt2.aspmx.l.google.com.",
                "10 alt3.aspmx.l.google.com.",
                "10 alt4.aspmx.l.google.com.",
            },
        });
    
    });
    
    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.RecordSet;
    import com.pulumi.gcp.dns.RecordSetArgs;
    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 prod = new ManagedZone("prod", ManagedZoneArgs.builder()
                .name("prod-zone")
                .dnsName("prod.mydomain.com.")
                .build());
    
            var mx = new RecordSet("mx", RecordSetArgs.builder()
                .name(prod.dnsName())
                .managedZone(prod.name())
                .type("MX")
                .ttl(3600)
                .rrdatas(            
                    "1 aspmx.l.google.com.",
                    "5 alt1.aspmx.l.google.com.",
                    "5 alt2.aspmx.l.google.com.",
                    "10 alt3.aspmx.l.google.com.",
                    "10 alt4.aspmx.l.google.com.")
                .build());
    
        }
    }
    
    resources:
      mx:
        type: gcp:dns:RecordSet
        properties:
          name: ${prod.dnsName}
          managedZone: ${prod.name}
          type: MX
          ttl: 3600
          rrdatas:
            - 1 aspmx.l.google.com.
            - 5 alt1.aspmx.l.google.com.
            - 5 alt2.aspmx.l.google.com.
            - 10 alt3.aspmx.l.google.com.
            - 10 alt4.aspmx.l.google.com.
      prod:
        type: gcp:dns:ManagedZone
        properties:
          name: prod-zone
          dnsName: prod.mydomain.com.
    

    Adding an SPF record

    Quotes ("") must be added around your rrdatas for a SPF record. Otherwise rrdatas string gets split on spaces.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const prod = new gcp.dns.ManagedZone("prod", {
        name: "prod-zone",
        dnsName: "prod.mydomain.com.",
    });
    const spf = new gcp.dns.RecordSet("spf", {
        name: pulumi.interpolate`frontend.${prod.dnsName}`,
        managedZone: prod.name,
        type: "TXT",
        ttl: 300,
        rrdatas: ["\"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all\""],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    prod = gcp.dns.ManagedZone("prod",
        name="prod-zone",
        dns_name="prod.mydomain.com.")
    spf = gcp.dns.RecordSet("spf",
        name=prod.dns_name.apply(lambda dns_name: f"frontend.{dns_name}"),
        managed_zone=prod.name,
        type="TXT",
        ttl=300,
        rrdatas=["\"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all\""])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		prod, err := dns.NewManagedZone(ctx, "prod", &dns.ManagedZoneArgs{
    			Name:    pulumi.String("prod-zone"),
    			DnsName: pulumi.String("prod.mydomain.com."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewRecordSet(ctx, "spf", &dns.RecordSetArgs{
    			Name: prod.DnsName.ApplyT(func(dnsName string) (string, error) {
    				return fmt.Sprintf("frontend.%v", dnsName), nil
    			}).(pulumi.StringOutput),
    			ManagedZone: prod.Name,
    			Type:        pulumi.String("TXT"),
    			Ttl:         pulumi.Int(300),
    			Rrdatas: pulumi.StringArray{
    				pulumi.String("\"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all\""),
    			},
    		})
    		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 prod = new Gcp.Dns.ManagedZone("prod", new()
        {
            Name = "prod-zone",
            DnsName = "prod.mydomain.com.",
        });
    
        var spf = new Gcp.Dns.RecordSet("spf", new()
        {
            Name = prod.DnsName.Apply(dnsName => $"frontend.{dnsName}"),
            ManagedZone = prod.Name,
            Type = "TXT",
            Ttl = 300,
            Rrdatas = new[]
            {
                "\"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all\"",
            },
        });
    
    });
    
    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.RecordSet;
    import com.pulumi.gcp.dns.RecordSetArgs;
    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 prod = new ManagedZone("prod", ManagedZoneArgs.builder()
                .name("prod-zone")
                .dnsName("prod.mydomain.com.")
                .build());
    
            var spf = new RecordSet("spf", RecordSetArgs.builder()
                .name(prod.dnsName().applyValue(dnsName -> String.format("frontend.%s", dnsName)))
                .managedZone(prod.name())
                .type("TXT")
                .ttl(300)
                .rrdatas("\"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all\"")
                .build());
    
        }
    }
    
    resources:
      spf:
        type: gcp:dns:RecordSet
        properties:
          name: frontend.${prod.dnsName}
          managedZone: ${prod.name}
          type: TXT
          ttl: 300
          rrdatas:
            - '"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all"'
      prod:
        type: gcp:dns:ManagedZone
        properties:
          name: prod-zone
          dnsName: prod.mydomain.com.
    

    Adding a CNAME record

    The list of rrdatas should only contain a single string corresponding to the Canonical Name intended.

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const prod = new gcp.dns.ManagedZone("prod", {
        name: "prod-zone",
        dnsName: "prod.mydomain.com.",
    });
    const cname = new gcp.dns.RecordSet("cname", {
        name: pulumi.interpolate`frontend.${prod.dnsName}`,
        managedZone: prod.name,
        type: "CNAME",
        ttl: 300,
        rrdatas: ["frontend.mydomain.com."],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    prod = gcp.dns.ManagedZone("prod",
        name="prod-zone",
        dns_name="prod.mydomain.com.")
    cname = gcp.dns.RecordSet("cname",
        name=prod.dns_name.apply(lambda dns_name: f"frontend.{dns_name}"),
        managed_zone=prod.name,
        type="CNAME",
        ttl=300,
        rrdatas=["frontend.mydomain.com."])
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		prod, err := dns.NewManagedZone(ctx, "prod", &dns.ManagedZoneArgs{
    			Name:    pulumi.String("prod-zone"),
    			DnsName: pulumi.String("prod.mydomain.com."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewRecordSet(ctx, "cname", &dns.RecordSetArgs{
    			Name: prod.DnsName.ApplyT(func(dnsName string) (string, error) {
    				return fmt.Sprintf("frontend.%v", dnsName), nil
    			}).(pulumi.StringOutput),
    			ManagedZone: prod.Name,
    			Type:        pulumi.String("CNAME"),
    			Ttl:         pulumi.Int(300),
    			Rrdatas: pulumi.StringArray{
    				pulumi.String("frontend.mydomain.com."),
    			},
    		})
    		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 prod = new Gcp.Dns.ManagedZone("prod", new()
        {
            Name = "prod-zone",
            DnsName = "prod.mydomain.com.",
        });
    
        var cname = new Gcp.Dns.RecordSet("cname", new()
        {
            Name = prod.DnsName.Apply(dnsName => $"frontend.{dnsName}"),
            ManagedZone = prod.Name,
            Type = "CNAME",
            Ttl = 300,
            Rrdatas = new[]
            {
                "frontend.mydomain.com.",
            },
        });
    
    });
    
    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.RecordSet;
    import com.pulumi.gcp.dns.RecordSetArgs;
    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 prod = new ManagedZone("prod", ManagedZoneArgs.builder()
                .name("prod-zone")
                .dnsName("prod.mydomain.com.")
                .build());
    
            var cname = new RecordSet("cname", RecordSetArgs.builder()
                .name(prod.dnsName().applyValue(dnsName -> String.format("frontend.%s", dnsName)))
                .managedZone(prod.name())
                .type("CNAME")
                .ttl(300)
                .rrdatas("frontend.mydomain.com.")
                .build());
    
        }
    }
    
    resources:
      cname:
        type: gcp:dns:RecordSet
        properties:
          name: frontend.${prod.dnsName}
          managedZone: ${prod.name}
          type: CNAME
          ttl: 300
          rrdatas:
            - frontend.mydomain.com.
      prod:
        type: gcp:dns:ManagedZone
        properties:
          name: prod-zone
          dnsName: prod.mydomain.com.
    

    Setting Routing Policy instead of using rrdatas

    Geolocation

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const geo = new gcp.dns.RecordSet("geo", {
        name: `backend.${prod.dnsName}`,
        managedZone: prod.name,
        type: "A",
        ttl: 300,
        routingPolicy: {
            geos: [
                {
                    location: "asia-east1",
                    rrdatas: ["10.128.1.1"],
                },
                {
                    location: "us-central1",
                    rrdatas: ["10.130.1.1"],
                },
            ],
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    geo = gcp.dns.RecordSet("geo",
        name=f"backend.{prod['dnsName']}",
        managed_zone=prod["name"],
        type="A",
        ttl=300,
        routing_policy={
            "geos": [
                {
                    "location": "asia-east1",
                    "rrdatas": ["10.128.1.1"],
                },
                {
                    "location": "us-central1",
                    "rrdatas": ["10.130.1.1"],
                },
            ],
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dns.NewRecordSet(ctx, "geo", &dns.RecordSetArgs{
    			Name:        pulumi.Sprintf("backend.%v", prod.DnsName),
    			ManagedZone: pulumi.Any(prod.Name),
    			Type:        pulumi.String("A"),
    			Ttl:         pulumi.Int(300),
    			RoutingPolicy: &dns.RecordSetRoutingPolicyArgs{
    				Geos: dns.RecordSetRoutingPolicyGeoArray{
    					&dns.RecordSetRoutingPolicyGeoArgs{
    						Location: pulumi.String("asia-east1"),
    						Rrdatas: pulumi.StringArray{
    							pulumi.String("10.128.1.1"),
    						},
    					},
    					&dns.RecordSetRoutingPolicyGeoArgs{
    						Location: pulumi.String("us-central1"),
    						Rrdatas: pulumi.StringArray{
    							pulumi.String("10.130.1.1"),
    						},
    					},
    				},
    			},
    		})
    		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 geo = new Gcp.Dns.RecordSet("geo", new()
        {
            Name = $"backend.{prod.DnsName}",
            ManagedZone = prod.Name,
            Type = "A",
            Ttl = 300,
            RoutingPolicy = new Gcp.Dns.Inputs.RecordSetRoutingPolicyArgs
            {
                Geos = new[]
                {
                    new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoArgs
                    {
                        Location = "asia-east1",
                        Rrdatas = new[]
                        {
                            "10.128.1.1",
                        },
                    },
                    new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoArgs
                    {
                        Location = "us-central1",
                        Rrdatas = new[]
                        {
                            "10.130.1.1",
                        },
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.dns.RecordSet;
    import com.pulumi.gcp.dns.RecordSetArgs;
    import com.pulumi.gcp.dns.inputs.RecordSetRoutingPolicyArgs;
    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 geo = new RecordSet("geo", RecordSetArgs.builder()
                .name(String.format("backend.%s", prod.dnsName()))
                .managedZone(prod.name())
                .type("A")
                .ttl(300)
                .routingPolicy(RecordSetRoutingPolicyArgs.builder()
                    .geos(                
                        RecordSetRoutingPolicyGeoArgs.builder()
                            .location("asia-east1")
                            .rrdatas("10.128.1.1")
                            .build(),
                        RecordSetRoutingPolicyGeoArgs.builder()
                            .location("us-central1")
                            .rrdatas("10.130.1.1")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      geo:
        type: gcp:dns:RecordSet
        properties:
          name: backend.${prod.dnsName}
          managedZone: ${prod.name}
          type: A
          ttl: 300
          routingPolicy:
            geos:
              - location: asia-east1
                rrdatas:
                  - 10.128.1.1
              - location: us-central1
                rrdatas:
                  - 10.130.1.1
    

    Failover

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const prod = new gcp.dns.ManagedZone("prod", {
        name: "prod-zone",
        dnsName: "prod.mydomain.com.",
    });
    const prodRegionBackendService = new gcp.compute.RegionBackendService("prod", {
        name: "prod-backend",
        region: "us-central1",
    });
    const prodNetwork = new gcp.compute.Network("prod", {name: "prod-network"});
    const prodForwardingRule = new gcp.compute.ForwardingRule("prod", {
        name: "prod-ilb",
        region: "us-central1",
        loadBalancingScheme: "INTERNAL",
        backendService: prodRegionBackendService.id,
        allPorts: true,
        network: prodNetwork.name,
        allowGlobalAccess: true,
    });
    const a = new gcp.dns.RecordSet("a", {
        name: pulumi.interpolate`backend.${prod.dnsName}`,
        managedZone: prod.name,
        type: "A",
        ttl: 300,
        routingPolicy: {
            primaryBackup: {
                trickleRatio: 0.1,
                primary: {
                    internalLoadBalancers: [{
                        loadBalancerType: "regionalL4ilb",
                        ipAddress: prodForwardingRule.ipAddress,
                        port: "80",
                        ipProtocol: "tcp",
                        networkUrl: prodNetwork.id,
                        project: prodForwardingRule.project,
                        region: prodForwardingRule.region,
                    }],
                },
                backupGeos: [
                    {
                        location: "asia-east1",
                        rrdatas: ["10.128.1.1"],
                    },
                    {
                        location: "us-west1",
                        rrdatas: ["10.130.1.1"],
                    },
                ],
            },
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    prod = gcp.dns.ManagedZone("prod",
        name="prod-zone",
        dns_name="prod.mydomain.com.")
    prod_region_backend_service = gcp.compute.RegionBackendService("prod",
        name="prod-backend",
        region="us-central1")
    prod_network = gcp.compute.Network("prod", name="prod-network")
    prod_forwarding_rule = gcp.compute.ForwardingRule("prod",
        name="prod-ilb",
        region="us-central1",
        load_balancing_scheme="INTERNAL",
        backend_service=prod_region_backend_service.id,
        all_ports=True,
        network=prod_network.name,
        allow_global_access=True)
    a = gcp.dns.RecordSet("a",
        name=prod.dns_name.apply(lambda dns_name: f"backend.{dns_name}"),
        managed_zone=prod.name,
        type="A",
        ttl=300,
        routing_policy={
            "primary_backup": {
                "trickle_ratio": 0.1,
                "primary": {
                    "internal_load_balancers": [{
                        "load_balancer_type": "regionalL4ilb",
                        "ip_address": prod_forwarding_rule.ip_address,
                        "port": "80",
                        "ip_protocol": "tcp",
                        "network_url": prod_network.id,
                        "project": prod_forwarding_rule.project,
                        "region": prod_forwarding_rule.region,
                    }],
                },
                "backup_geos": [
                    {
                        "location": "asia-east1",
                        "rrdatas": ["10.128.1.1"],
                    },
                    {
                        "location": "us-west1",
                        "rrdatas": ["10.130.1.1"],
                    },
                ],
            },
        })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		prod, err := dns.NewManagedZone(ctx, "prod", &dns.ManagedZoneArgs{
    			Name:    pulumi.String("prod-zone"),
    			DnsName: pulumi.String("prod.mydomain.com."),
    		})
    		if err != nil {
    			return err
    		}
    		prodRegionBackendService, err := compute.NewRegionBackendService(ctx, "prod", &compute.RegionBackendServiceArgs{
    			Name:   pulumi.String("prod-backend"),
    			Region: pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		prodNetwork, err := compute.NewNetwork(ctx, "prod", &compute.NetworkArgs{
    			Name: pulumi.String("prod-network"),
    		})
    		if err != nil {
    			return err
    		}
    		prodForwardingRule, err := compute.NewForwardingRule(ctx, "prod", &compute.ForwardingRuleArgs{
    			Name:                pulumi.String("prod-ilb"),
    			Region:              pulumi.String("us-central1"),
    			LoadBalancingScheme: pulumi.String("INTERNAL"),
    			BackendService:      prodRegionBackendService.ID(),
    			AllPorts:            pulumi.Bool(true),
    			Network:             prodNetwork.Name,
    			AllowGlobalAccess:   pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = dns.NewRecordSet(ctx, "a", &dns.RecordSetArgs{
    			Name: prod.DnsName.ApplyT(func(dnsName string) (string, error) {
    				return fmt.Sprintf("backend.%v", dnsName), nil
    			}).(pulumi.StringOutput),
    			ManagedZone: prod.Name,
    			Type:        pulumi.String("A"),
    			Ttl:         pulumi.Int(300),
    			RoutingPolicy: &dns.RecordSetRoutingPolicyArgs{
    				PrimaryBackup: &dns.RecordSetRoutingPolicyPrimaryBackupArgs{
    					TrickleRatio: pulumi.Float64(0.1),
    					Primary: &dns.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs{
    						InternalLoadBalancers: dns.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArray{
    							&dns.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs{
    								LoadBalancerType: pulumi.String("regionalL4ilb"),
    								IpAddress:        prodForwardingRule.IpAddress,
    								Port:             pulumi.String("80"),
    								IpProtocol:       pulumi.String("tcp"),
    								NetworkUrl:       prodNetwork.ID(),
    								Project:          prodForwardingRule.Project,
    								Region:           prodForwardingRule.Region,
    							},
    						},
    					},
    					BackupGeos: dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArray{
    						&dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs{
    							Location: pulumi.String("asia-east1"),
    							Rrdatas: pulumi.StringArray{
    								pulumi.String("10.128.1.1"),
    							},
    						},
    						&dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs{
    							Location: pulumi.String("us-west1"),
    							Rrdatas: pulumi.StringArray{
    								pulumi.String("10.130.1.1"),
    							},
    						},
    					},
    				},
    			},
    		})
    		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 prod = new Gcp.Dns.ManagedZone("prod", new()
        {
            Name = "prod-zone",
            DnsName = "prod.mydomain.com.",
        });
    
        var prodRegionBackendService = new Gcp.Compute.RegionBackendService("prod", new()
        {
            Name = "prod-backend",
            Region = "us-central1",
        });
    
        var prodNetwork = new Gcp.Compute.Network("prod", new()
        {
            Name = "prod-network",
        });
    
        var prodForwardingRule = new Gcp.Compute.ForwardingRule("prod", new()
        {
            Name = "prod-ilb",
            Region = "us-central1",
            LoadBalancingScheme = "INTERNAL",
            BackendService = prodRegionBackendService.Id,
            AllPorts = true,
            Network = prodNetwork.Name,
            AllowGlobalAccess = true,
        });
    
        var a = new Gcp.Dns.RecordSet("a", new()
        {
            Name = prod.DnsName.Apply(dnsName => $"backend.{dnsName}"),
            ManagedZone = prod.Name,
            Type = "A",
            Ttl = 300,
            RoutingPolicy = new Gcp.Dns.Inputs.RecordSetRoutingPolicyArgs
            {
                PrimaryBackup = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupArgs
                {
                    TrickleRatio = 0.1,
                    Primary = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs
                    {
                        InternalLoadBalancers = new[]
                        {
                            new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs
                            {
                                LoadBalancerType = "regionalL4ilb",
                                IpAddress = prodForwardingRule.IpAddress,
                                Port = "80",
                                IpProtocol = "tcp",
                                NetworkUrl = prodNetwork.Id,
                                Project = prodForwardingRule.Project,
                                Region = prodForwardingRule.Region,
                            },
                        },
                    },
                    BackupGeos = new[]
                    {
                        new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs
                        {
                            Location = "asia-east1",
                            Rrdatas = new[]
                            {
                                "10.128.1.1",
                            },
                        },
                        new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs
                        {
                            Location = "us-west1",
                            Rrdatas = new[]
                            {
                                "10.130.1.1",
                            },
                        },
                    },
                },
            },
        });
    
    });
    
    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.compute.RegionBackendService;
    import com.pulumi.gcp.compute.RegionBackendServiceArgs;
    import com.pulumi.gcp.compute.Network;
    import com.pulumi.gcp.compute.NetworkArgs;
    import com.pulumi.gcp.compute.ForwardingRule;
    import com.pulumi.gcp.compute.ForwardingRuleArgs;
    import com.pulumi.gcp.dns.RecordSet;
    import com.pulumi.gcp.dns.RecordSetArgs;
    import com.pulumi.gcp.dns.inputs.RecordSetRoutingPolicyArgs;
    import com.pulumi.gcp.dns.inputs.RecordSetRoutingPolicyPrimaryBackupArgs;
    import com.pulumi.gcp.dns.inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs;
    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 prod = new ManagedZone("prod", ManagedZoneArgs.builder()
                .name("prod-zone")
                .dnsName("prod.mydomain.com.")
                .build());
    
            var prodRegionBackendService = new RegionBackendService("prodRegionBackendService", RegionBackendServiceArgs.builder()
                .name("prod-backend")
                .region("us-central1")
                .build());
    
            var prodNetwork = new Network("prodNetwork", NetworkArgs.builder()
                .name("prod-network")
                .build());
    
            var prodForwardingRule = new ForwardingRule("prodForwardingRule", ForwardingRuleArgs.builder()
                .name("prod-ilb")
                .region("us-central1")
                .loadBalancingScheme("INTERNAL")
                .backendService(prodRegionBackendService.id())
                .allPorts(true)
                .network(prodNetwork.name())
                .allowGlobalAccess(true)
                .build());
    
            var a = new RecordSet("a", RecordSetArgs.builder()
                .name(prod.dnsName().applyValue(dnsName -> String.format("backend.%s", dnsName)))
                .managedZone(prod.name())
                .type("A")
                .ttl(300)
                .routingPolicy(RecordSetRoutingPolicyArgs.builder()
                    .primaryBackup(RecordSetRoutingPolicyPrimaryBackupArgs.builder()
                        .trickleRatio(0.1)
                        .primary(RecordSetRoutingPolicyPrimaryBackupPrimaryArgs.builder()
                            .internalLoadBalancers(RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs.builder()
                                .loadBalancerType("regionalL4ilb")
                                .ipAddress(prodForwardingRule.ipAddress())
                                .port("80")
                                .ipProtocol("tcp")
                                .networkUrl(prodNetwork.id())
                                .project(prodForwardingRule.project())
                                .region(prodForwardingRule.region())
                                .build())
                            .build())
                        .backupGeos(                    
                            RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs.builder()
                                .location("asia-east1")
                                .rrdatas("10.128.1.1")
                                .build(),
                            RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs.builder()
                                .location("us-west1")
                                .rrdatas("10.130.1.1")
                                .build())
                        .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      a:
        type: gcp:dns:RecordSet
        properties:
          name: backend.${prod.dnsName}
          managedZone: ${prod.name}
          type: A
          ttl: 300
          routingPolicy:
            primaryBackup:
              trickleRatio: 0.1
              primary:
                internalLoadBalancers:
                  - loadBalancerType: regionalL4ilb
                    ipAddress: ${prodForwardingRule.ipAddress}
                    port: '80'
                    ipProtocol: tcp
                    networkUrl: ${prodNetwork.id}
                    project: ${prodForwardingRule.project}
                    region: ${prodForwardingRule.region}
              backupGeos:
                - location: asia-east1
                  rrdatas:
                    - 10.128.1.1
                - location: us-west1
                  rrdatas:
                    - 10.130.1.1
      prod:
        type: gcp:dns:ManagedZone
        properties:
          name: prod-zone
          dnsName: prod.mydomain.com.
      prodForwardingRule:
        type: gcp:compute:ForwardingRule
        name: prod
        properties:
          name: prod-ilb
          region: us-central1
          loadBalancingScheme: INTERNAL
          backendService: ${prodRegionBackendService.id}
          allPorts: true
          network: ${prodNetwork.name}
          allowGlobalAccess: true
      prodRegionBackendService:
        type: gcp:compute:RegionBackendService
        name: prod
        properties:
          name: prod-backend
          region: us-central1
      prodNetwork:
        type: gcp:compute:Network
        name: prod
        properties:
          name: prod-network
    

    Create RecordSet Resource

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

    Constructor syntax

    new RecordSet(name: string, args: RecordSetArgs, opts?: CustomResourceOptions);
    @overload
    def RecordSet(resource_name: str,
                  args: RecordSetArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def RecordSet(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  managed_zone: Optional[str] = None,
                  name: Optional[str] = None,
                  type: Optional[str] = None,
                  project: Optional[str] = None,
                  routing_policy: Optional[RecordSetRoutingPolicyArgs] = None,
                  rrdatas: Optional[Sequence[str]] = None,
                  ttl: Optional[int] = None)
    func NewRecordSet(ctx *Context, name string, args RecordSetArgs, opts ...ResourceOption) (*RecordSet, error)
    public RecordSet(string name, RecordSetArgs args, CustomResourceOptions? opts = null)
    public RecordSet(String name, RecordSetArgs args)
    public RecordSet(String name, RecordSetArgs args, CustomResourceOptions options)
    
    type: gcp:dns:RecordSet
    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 RecordSetArgs
    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 RecordSetArgs
    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 RecordSetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RecordSetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RecordSetArgs
    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 recordSetResource = new Gcp.Dns.RecordSet("recordSetResource", new()
    {
        ManagedZone = "string",
        Name = "string",
        Type = "string",
        Project = "string",
        RoutingPolicy = new Gcp.Dns.Inputs.RecordSetRoutingPolicyArgs
        {
            EnableGeoFencing = false,
            Geos = new[]
            {
                new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoArgs
                {
                    Location = "string",
                    HealthCheckedTargets = new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoHealthCheckedTargetsArgs
                    {
                        InternalLoadBalancers = new[]
                        {
                            new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArgs
                            {
                                IpAddress = "string",
                                IpProtocol = "string",
                                NetworkUrl = "string",
                                Port = "string",
                                Project = "string",
                                LoadBalancerType = "string",
                                Region = "string",
                            },
                        },
                    },
                    Rrdatas = new[]
                    {
                        "string",
                    },
                },
            },
            PrimaryBackup = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupArgs
            {
                BackupGeos = new[]
                {
                    new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs
                    {
                        Location = "string",
                        HealthCheckedTargets = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs
                        {
                            InternalLoadBalancers = new[]
                            {
                                new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancerArgs
                                {
                                    IpAddress = "string",
                                    IpProtocol = "string",
                                    NetworkUrl = "string",
                                    Port = "string",
                                    Project = "string",
                                    LoadBalancerType = "string",
                                    Region = "string",
                                },
                            },
                        },
                        Rrdatas = new[]
                        {
                            "string",
                        },
                    },
                },
                Primary = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs
                {
                    InternalLoadBalancers = new[]
                    {
                        new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs
                        {
                            IpAddress = "string",
                            IpProtocol = "string",
                            NetworkUrl = "string",
                            Port = "string",
                            Project = "string",
                            LoadBalancerType = "string",
                            Region = "string",
                        },
                    },
                },
                EnableGeoFencingForBackups = false,
                TrickleRatio = 0,
            },
            Wrrs = new[]
            {
                new Gcp.Dns.Inputs.RecordSetRoutingPolicyWrrArgs
                {
                    Weight = 0,
                    HealthCheckedTargets = new Gcp.Dns.Inputs.RecordSetRoutingPolicyWrrHealthCheckedTargetsArgs
                    {
                        InternalLoadBalancers = new[]
                        {
                            new Gcp.Dns.Inputs.RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancerArgs
                            {
                                IpAddress = "string",
                                IpProtocol = "string",
                                NetworkUrl = "string",
                                Port = "string",
                                Project = "string",
                                LoadBalancerType = "string",
                                Region = "string",
                            },
                        },
                    },
                    Rrdatas = new[]
                    {
                        "string",
                    },
                },
            },
        },
        Rrdatas = new[]
        {
            "string",
        },
        Ttl = 0,
    });
    
    example, err := dns.NewRecordSet(ctx, "recordSetResource", &dns.RecordSetArgs{
    	ManagedZone: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    	Type:        pulumi.String("string"),
    	Project:     pulumi.String("string"),
    	RoutingPolicy: &dns.RecordSetRoutingPolicyArgs{
    		EnableGeoFencing: pulumi.Bool(false),
    		Geos: dns.RecordSetRoutingPolicyGeoArray{
    			&dns.RecordSetRoutingPolicyGeoArgs{
    				Location: pulumi.String("string"),
    				HealthCheckedTargets: &dns.RecordSetRoutingPolicyGeoHealthCheckedTargetsArgs{
    					InternalLoadBalancers: dns.RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArray{
    						&dns.RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArgs{
    							IpAddress:        pulumi.String("string"),
    							IpProtocol:       pulumi.String("string"),
    							NetworkUrl:       pulumi.String("string"),
    							Port:             pulumi.String("string"),
    							Project:          pulumi.String("string"),
    							LoadBalancerType: pulumi.String("string"),
    							Region:           pulumi.String("string"),
    						},
    					},
    				},
    				Rrdatas: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    		PrimaryBackup: &dns.RecordSetRoutingPolicyPrimaryBackupArgs{
    			BackupGeos: dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArray{
    				&dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs{
    					Location: pulumi.String("string"),
    					HealthCheckedTargets: &dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs{
    						InternalLoadBalancers: dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancerArray{
    							&dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancerArgs{
    								IpAddress:        pulumi.String("string"),
    								IpProtocol:       pulumi.String("string"),
    								NetworkUrl:       pulumi.String("string"),
    								Port:             pulumi.String("string"),
    								Project:          pulumi.String("string"),
    								LoadBalancerType: pulumi.String("string"),
    								Region:           pulumi.String("string"),
    							},
    						},
    					},
    					Rrdatas: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    				},
    			},
    			Primary: &dns.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs{
    				InternalLoadBalancers: dns.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArray{
    					&dns.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs{
    						IpAddress:        pulumi.String("string"),
    						IpProtocol:       pulumi.String("string"),
    						NetworkUrl:       pulumi.String("string"),
    						Port:             pulumi.String("string"),
    						Project:          pulumi.String("string"),
    						LoadBalancerType: pulumi.String("string"),
    						Region:           pulumi.String("string"),
    					},
    				},
    			},
    			EnableGeoFencingForBackups: pulumi.Bool(false),
    			TrickleRatio:               pulumi.Float64(0),
    		},
    		Wrrs: dns.RecordSetRoutingPolicyWrrArray{
    			&dns.RecordSetRoutingPolicyWrrArgs{
    				Weight: pulumi.Float64(0),
    				HealthCheckedTargets: &dns.RecordSetRoutingPolicyWrrHealthCheckedTargetsArgs{
    					InternalLoadBalancers: dns.RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancerArray{
    						&dns.RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancerArgs{
    							IpAddress:        pulumi.String("string"),
    							IpProtocol:       pulumi.String("string"),
    							NetworkUrl:       pulumi.String("string"),
    							Port:             pulumi.String("string"),
    							Project:          pulumi.String("string"),
    							LoadBalancerType: pulumi.String("string"),
    							Region:           pulumi.String("string"),
    						},
    					},
    				},
    				Rrdatas: pulumi.StringArray{
    					pulumi.String("string"),
    				},
    			},
    		},
    	},
    	Rrdatas: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Ttl: pulumi.Int(0),
    })
    
    var recordSetResource = new RecordSet("recordSetResource", RecordSetArgs.builder()
        .managedZone("string")
        .name("string")
        .type("string")
        .project("string")
        .routingPolicy(RecordSetRoutingPolicyArgs.builder()
            .enableGeoFencing(false)
            .geos(RecordSetRoutingPolicyGeoArgs.builder()
                .location("string")
                .healthCheckedTargets(RecordSetRoutingPolicyGeoHealthCheckedTargetsArgs.builder()
                    .internalLoadBalancers(RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArgs.builder()
                        .ipAddress("string")
                        .ipProtocol("string")
                        .networkUrl("string")
                        .port("string")
                        .project("string")
                        .loadBalancerType("string")
                        .region("string")
                        .build())
                    .build())
                .rrdatas("string")
                .build())
            .primaryBackup(RecordSetRoutingPolicyPrimaryBackupArgs.builder()
                .backupGeos(RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs.builder()
                    .location("string")
                    .healthCheckedTargets(RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs.builder()
                        .internalLoadBalancers(RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancerArgs.builder()
                            .ipAddress("string")
                            .ipProtocol("string")
                            .networkUrl("string")
                            .port("string")
                            .project("string")
                            .loadBalancerType("string")
                            .region("string")
                            .build())
                        .build())
                    .rrdatas("string")
                    .build())
                .primary(RecordSetRoutingPolicyPrimaryBackupPrimaryArgs.builder()
                    .internalLoadBalancers(RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs.builder()
                        .ipAddress("string")
                        .ipProtocol("string")
                        .networkUrl("string")
                        .port("string")
                        .project("string")
                        .loadBalancerType("string")
                        .region("string")
                        .build())
                    .build())
                .enableGeoFencingForBackups(false)
                .trickleRatio(0)
                .build())
            .wrrs(RecordSetRoutingPolicyWrrArgs.builder()
                .weight(0)
                .healthCheckedTargets(RecordSetRoutingPolicyWrrHealthCheckedTargetsArgs.builder()
                    .internalLoadBalancers(RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancerArgs.builder()
                        .ipAddress("string")
                        .ipProtocol("string")
                        .networkUrl("string")
                        .port("string")
                        .project("string")
                        .loadBalancerType("string")
                        .region("string")
                        .build())
                    .build())
                .rrdatas("string")
                .build())
            .build())
        .rrdatas("string")
        .ttl(0)
        .build());
    
    record_set_resource = gcp.dns.RecordSet("recordSetResource",
        managed_zone="string",
        name="string",
        type="string",
        project="string",
        routing_policy={
            "enable_geo_fencing": False,
            "geos": [{
                "location": "string",
                "health_checked_targets": {
                    "internal_load_balancers": [{
                        "ip_address": "string",
                        "ip_protocol": "string",
                        "network_url": "string",
                        "port": "string",
                        "project": "string",
                        "load_balancer_type": "string",
                        "region": "string",
                    }],
                },
                "rrdatas": ["string"],
            }],
            "primary_backup": {
                "backup_geos": [{
                    "location": "string",
                    "health_checked_targets": {
                        "internal_load_balancers": [{
                            "ip_address": "string",
                            "ip_protocol": "string",
                            "network_url": "string",
                            "port": "string",
                            "project": "string",
                            "load_balancer_type": "string",
                            "region": "string",
                        }],
                    },
                    "rrdatas": ["string"],
                }],
                "primary": {
                    "internal_load_balancers": [{
                        "ip_address": "string",
                        "ip_protocol": "string",
                        "network_url": "string",
                        "port": "string",
                        "project": "string",
                        "load_balancer_type": "string",
                        "region": "string",
                    }],
                },
                "enable_geo_fencing_for_backups": False,
                "trickle_ratio": 0,
            },
            "wrrs": [{
                "weight": 0,
                "health_checked_targets": {
                    "internal_load_balancers": [{
                        "ip_address": "string",
                        "ip_protocol": "string",
                        "network_url": "string",
                        "port": "string",
                        "project": "string",
                        "load_balancer_type": "string",
                        "region": "string",
                    }],
                },
                "rrdatas": ["string"],
            }],
        },
        rrdatas=["string"],
        ttl=0)
    
    const recordSetResource = new gcp.dns.RecordSet("recordSetResource", {
        managedZone: "string",
        name: "string",
        type: "string",
        project: "string",
        routingPolicy: {
            enableGeoFencing: false,
            geos: [{
                location: "string",
                healthCheckedTargets: {
                    internalLoadBalancers: [{
                        ipAddress: "string",
                        ipProtocol: "string",
                        networkUrl: "string",
                        port: "string",
                        project: "string",
                        loadBalancerType: "string",
                        region: "string",
                    }],
                },
                rrdatas: ["string"],
            }],
            primaryBackup: {
                backupGeos: [{
                    location: "string",
                    healthCheckedTargets: {
                        internalLoadBalancers: [{
                            ipAddress: "string",
                            ipProtocol: "string",
                            networkUrl: "string",
                            port: "string",
                            project: "string",
                            loadBalancerType: "string",
                            region: "string",
                        }],
                    },
                    rrdatas: ["string"],
                }],
                primary: {
                    internalLoadBalancers: [{
                        ipAddress: "string",
                        ipProtocol: "string",
                        networkUrl: "string",
                        port: "string",
                        project: "string",
                        loadBalancerType: "string",
                        region: "string",
                    }],
                },
                enableGeoFencingForBackups: false,
                trickleRatio: 0,
            },
            wrrs: [{
                weight: 0,
                healthCheckedTargets: {
                    internalLoadBalancers: [{
                        ipAddress: "string",
                        ipProtocol: "string",
                        networkUrl: "string",
                        port: "string",
                        project: "string",
                        loadBalancerType: "string",
                        region: "string",
                    }],
                },
                rrdatas: ["string"],
            }],
        },
        rrdatas: ["string"],
        ttl: 0,
    });
    
    type: gcp:dns:RecordSet
    properties:
        managedZone: string
        name: string
        project: string
        routingPolicy:
            enableGeoFencing: false
            geos:
                - healthCheckedTargets:
                    internalLoadBalancers:
                        - ipAddress: string
                          ipProtocol: string
                          loadBalancerType: string
                          networkUrl: string
                          port: string
                          project: string
                          region: string
                  location: string
                  rrdatas:
                    - string
            primaryBackup:
                backupGeos:
                    - healthCheckedTargets:
                        internalLoadBalancers:
                            - ipAddress: string
                              ipProtocol: string
                              loadBalancerType: string
                              networkUrl: string
                              port: string
                              project: string
                              region: string
                      location: string
                      rrdatas:
                        - string
                enableGeoFencingForBackups: false
                primary:
                    internalLoadBalancers:
                        - ipAddress: string
                          ipProtocol: string
                          loadBalancerType: string
                          networkUrl: string
                          port: string
                          project: string
                          region: string
                trickleRatio: 0
            wrrs:
                - healthCheckedTargets:
                    internalLoadBalancers:
                        - ipAddress: string
                          ipProtocol: string
                          loadBalancerType: string
                          networkUrl: string
                          port: string
                          project: string
                          region: string
                  rrdatas:
                    - string
                  weight: 0
        rrdatas:
            - string
        ttl: 0
        type: string
    

    RecordSet Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The RecordSet resource accepts the following input properties:

    ManagedZone string
    The name of the zone in which this record set will reside.
    Name string
    The DNS name this record set will apply to.
    Type string
    The DNS record set type.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RoutingPolicy RecordSetRoutingPolicy
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    Rrdatas List<string>
    Ttl int
    The time-to-live of this record set (seconds).
    ManagedZone string
    The name of the zone in which this record set will reside.
    Name string
    The DNS name this record set will apply to.
    Type string
    The DNS record set type.


    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RoutingPolicy RecordSetRoutingPolicyArgs
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    Rrdatas []string
    Ttl int
    The time-to-live of this record set (seconds).
    managedZone String
    The name of the zone in which this record set will reside.
    name String
    The DNS name this record set will apply to.
    type String
    The DNS record set type.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routingPolicy RecordSetRoutingPolicy
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas List<String>
    ttl Integer
    The time-to-live of this record set (seconds).
    managedZone string
    The name of the zone in which this record set will reside.
    name string
    The DNS name this record set will apply to.
    type string
    The DNS record set type.


    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routingPolicy RecordSetRoutingPolicy
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas string[]
    ttl number
    The time-to-live of this record set (seconds).
    managed_zone str
    The name of the zone in which this record set will reside.
    name str
    The DNS name this record set will apply to.
    type str
    The DNS record set type.


    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routing_policy RecordSetRoutingPolicyArgs
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas Sequence[str]
    ttl int
    The time-to-live of this record set (seconds).
    managedZone String
    The name of the zone in which this record set will reside.
    name String
    The DNS name this record set will apply to.
    type String
    The DNS record set type.


    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routingPolicy Property Map
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas List<String>
    ttl Number
    The time-to-live of this record set (seconds).

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing RecordSet Resource

    Get an existing RecordSet 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?: RecordSetState, opts?: CustomResourceOptions): RecordSet
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            managed_zone: Optional[str] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            routing_policy: Optional[RecordSetRoutingPolicyArgs] = None,
            rrdatas: Optional[Sequence[str]] = None,
            ttl: Optional[int] = None,
            type: Optional[str] = None) -> RecordSet
    func GetRecordSet(ctx *Context, name string, id IDInput, state *RecordSetState, opts ...ResourceOption) (*RecordSet, error)
    public static RecordSet Get(string name, Input<string> id, RecordSetState? state, CustomResourceOptions? opts = null)
    public static RecordSet get(String name, Output<String> id, RecordSetState 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:
    ManagedZone string
    The name of the zone in which this record set will reside.
    Name string
    The DNS name this record set will apply to.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RoutingPolicy RecordSetRoutingPolicy
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    Rrdatas List<string>
    Ttl int
    The time-to-live of this record set (seconds).
    Type string
    The DNS record set type.


    ManagedZone string
    The name of the zone in which this record set will reside.
    Name string
    The DNS name this record set will apply to.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    RoutingPolicy RecordSetRoutingPolicyArgs
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    Rrdatas []string
    Ttl int
    The time-to-live of this record set (seconds).
    Type string
    The DNS record set type.


    managedZone String
    The name of the zone in which this record set will reside.
    name String
    The DNS name this record set will apply to.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routingPolicy RecordSetRoutingPolicy
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas List<String>
    ttl Integer
    The time-to-live of this record set (seconds).
    type String
    The DNS record set type.


    managedZone string
    The name of the zone in which this record set will reside.
    name string
    The DNS name this record set will apply to.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routingPolicy RecordSetRoutingPolicy
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas string[]
    ttl number
    The time-to-live of this record set (seconds).
    type string
    The DNS record set type.


    managed_zone str
    The name of the zone in which this record set will reside.
    name str
    The DNS name this record set will apply to.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routing_policy RecordSetRoutingPolicyArgs
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas Sequence[str]
    ttl int
    The time-to-live of this record set (seconds).
    type str
    The DNS record set type.


    managedZone String
    The name of the zone in which this record set will reside.
    name String
    The DNS name this record set will apply to.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    routingPolicy Property Map
    The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
    rrdatas List<String>
    ttl Number
    The time-to-live of this record set (seconds).
    type String
    The DNS record set type.


    Supporting Types

    RecordSetRoutingPolicy, RecordSetRoutingPolicyArgs

    EnableGeoFencing bool
    Specifies whether to enable fencing for geo queries.
    Geos List<RecordSetRoutingPolicyGeo>
    The configuration for Geolocation based routing policy. Structure is documented below.
    PrimaryBackup RecordSetRoutingPolicyPrimaryBackup
    The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
    Wrrs List<RecordSetRoutingPolicyWrr>
    The configuration for Weighted Round Robin based routing policy. Structure is documented below.
    EnableGeoFencing bool
    Specifies whether to enable fencing for geo queries.
    Geos []RecordSetRoutingPolicyGeo
    The configuration for Geolocation based routing policy. Structure is documented below.
    PrimaryBackup RecordSetRoutingPolicyPrimaryBackup
    The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
    Wrrs []RecordSetRoutingPolicyWrr
    The configuration for Weighted Round Robin based routing policy. Structure is documented below.
    enableGeoFencing Boolean
    Specifies whether to enable fencing for geo queries.
    geos List<RecordSetRoutingPolicyGeo>
    The configuration for Geolocation based routing policy. Structure is documented below.
    primaryBackup RecordSetRoutingPolicyPrimaryBackup
    The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
    wrrs List<RecordSetRoutingPolicyWrr>
    The configuration for Weighted Round Robin based routing policy. Structure is documented below.
    enableGeoFencing boolean
    Specifies whether to enable fencing for geo queries.
    geos RecordSetRoutingPolicyGeo[]
    The configuration for Geolocation based routing policy. Structure is documented below.
    primaryBackup RecordSetRoutingPolicyPrimaryBackup
    The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
    wrrs RecordSetRoutingPolicyWrr[]
    The configuration for Weighted Round Robin based routing policy. Structure is documented below.
    enable_geo_fencing bool
    Specifies whether to enable fencing for geo queries.
    geos Sequence[RecordSetRoutingPolicyGeo]
    The configuration for Geolocation based routing policy. Structure is documented below.
    primary_backup RecordSetRoutingPolicyPrimaryBackup
    The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
    wrrs Sequence[RecordSetRoutingPolicyWrr]
    The configuration for Weighted Round Robin based routing policy. Structure is documented below.
    enableGeoFencing Boolean
    Specifies whether to enable fencing for geo queries.
    geos List<Property Map>
    The configuration for Geolocation based routing policy. Structure is documented below.
    primaryBackup Property Map
    The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
    wrrs List<Property Map>
    The configuration for Weighted Round Robin based routing policy. Structure is documented below.

    RecordSetRoutingPolicyGeo, RecordSetRoutingPolicyGeoArgs

    Location string
    The location name defined in Google Cloud.
    HealthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
    Rrdatas List<string>
    Same as rrdatas above.
    Location string
    The location name defined in Google Cloud.
    HealthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
    Rrdatas []string
    Same as rrdatas above.
    location String
    The location name defined in Google Cloud.
    healthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
    rrdatas List<String>
    Same as rrdatas above.
    location string
    The location name defined in Google Cloud.
    healthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
    rrdatas string[]
    Same as rrdatas above.
    location str
    The location name defined in Google Cloud.
    health_checked_targets RecordSetRoutingPolicyGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
    rrdatas Sequence[str]
    Same as rrdatas above.
    location String
    The location name defined in Google Cloud.
    healthCheckedTargets Property Map
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
    rrdatas List<String>
    Same as rrdatas above.

    RecordSetRoutingPolicyGeoHealthCheckedTargets, RecordSetRoutingPolicyGeoHealthCheckedTargetsArgs

    InternalLoadBalancers List<RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer>
    The list of internal load balancers to health check. Structure is documented below.
    InternalLoadBalancers []RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers List<RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer>
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer[]
    The list of internal load balancers to health check. Structure is documented below.
    internal_load_balancers Sequence[RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer]
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers List<Property Map>
    The list of internal load balancers to health check. Structure is documented below.

    RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer, RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArgs

    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress string
    The frontend IP address of the load balancer.
    ipProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port string
    The configured port of the load balancer.
    project string
    The ID of the project in which the load balancer belongs.
    loadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region string
    The region of the load balancer. Only needed for regional load balancers.
    ip_address str
    The frontend IP address of the load balancer.
    ip_protocol str
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    network_url str
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port str
    The configured port of the load balancer.
    project str
    The ID of the project in which the load balancer belongs.
    load_balancer_type str
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region str
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.

    RecordSetRoutingPolicyPrimaryBackup, RecordSetRoutingPolicyPrimaryBackupArgs

    BackupGeos List<RecordSetRoutingPolicyPrimaryBackupBackupGeo>
    The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
    Primary RecordSetRoutingPolicyPrimaryBackupPrimary
    The list of global primary targets to be health checked. Structure is documented below.
    EnableGeoFencingForBackups bool
    Specifies whether to enable fencing for backup geo queries.
    TrickleRatio double
    Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.
    BackupGeos []RecordSetRoutingPolicyPrimaryBackupBackupGeo
    The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
    Primary RecordSetRoutingPolicyPrimaryBackupPrimary
    The list of global primary targets to be health checked. Structure is documented below.
    EnableGeoFencingForBackups bool
    Specifies whether to enable fencing for backup geo queries.
    TrickleRatio float64
    Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.
    backupGeos List<RecordSetRoutingPolicyPrimaryBackupBackupGeo>
    The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
    primary RecordSetRoutingPolicyPrimaryBackupPrimary
    The list of global primary targets to be health checked. Structure is documented below.
    enableGeoFencingForBackups Boolean
    Specifies whether to enable fencing for backup geo queries.
    trickleRatio Double
    Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.
    backupGeos RecordSetRoutingPolicyPrimaryBackupBackupGeo[]
    The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
    primary RecordSetRoutingPolicyPrimaryBackupPrimary
    The list of global primary targets to be health checked. Structure is documented below.
    enableGeoFencingForBackups boolean
    Specifies whether to enable fencing for backup geo queries.
    trickleRatio number
    Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.
    backup_geos Sequence[RecordSetRoutingPolicyPrimaryBackupBackupGeo]
    The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
    primary RecordSetRoutingPolicyPrimaryBackupPrimary
    The list of global primary targets to be health checked. Structure is documented below.
    enable_geo_fencing_for_backups bool
    Specifies whether to enable fencing for backup geo queries.
    trickle_ratio float
    Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.
    backupGeos List<Property Map>
    The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
    primary Property Map
    The list of global primary targets to be health checked. Structure is documented below.
    enableGeoFencingForBackups Boolean
    Specifies whether to enable fencing for backup geo queries.
    trickleRatio Number
    Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.

    RecordSetRoutingPolicyPrimaryBackupBackupGeo, RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs

    Location string
    The location name defined in Google Cloud.
    HealthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item.
    Rrdatas List<string>
    Location string
    The location name defined in Google Cloud.
    HealthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item.
    Rrdatas []string
    location String
    The location name defined in Google Cloud.
    healthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item.
    rrdatas List<String>
    location string
    The location name defined in Google Cloud.
    healthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item.
    rrdatas string[]
    location str
    The location name defined in Google Cloud.
    health_checked_targets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item.
    rrdatas Sequence[str]
    location String
    The location name defined in Google Cloud.
    healthCheckedTargets Property Map
    For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item.
    rrdatas List<String>

    RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets, RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs

    InternalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer>
    The list of internal load balancers to health check. Structure is documented below.
    InternalLoadBalancers []RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer>
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer[]
    The list of internal load balancers to health check. Structure is documented below.
    internal_load_balancers Sequence[RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer]
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers List<Property Map>
    The list of internal load balancers to health check. Structure is documented below.

    RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer, RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancerArgs

    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress string
    The frontend IP address of the load balancer.
    ipProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port string
    The configured port of the load balancer.
    project string
    The ID of the project in which the load balancer belongs.
    loadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region string
    The region of the load balancer. Only needed for regional load balancers.
    ip_address str
    The frontend IP address of the load balancer.
    ip_protocol str
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    network_url str
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port str
    The configured port of the load balancer.
    project str
    The ID of the project in which the load balancer belongs.
    load_balancer_type str
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region str
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.

    RecordSetRoutingPolicyPrimaryBackupPrimary, RecordSetRoutingPolicyPrimaryBackupPrimaryArgs

    internalLoadBalancers List<Property Map>
    The list of internal load balancers to health check.

    RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer, RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs

    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress string
    The frontend IP address of the load balancer.
    ipProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port string
    The configured port of the load balancer.
    project string
    The ID of the project in which the load balancer belongs.
    loadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region string
    The region of the load balancer. Only needed for regional load balancers.
    ip_address str
    The frontend IP address of the load balancer.
    ip_protocol str
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    network_url str
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port str
    The configured port of the load balancer.
    project str
    The ID of the project in which the load balancer belongs.
    load_balancer_type str
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region str
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.

    RecordSetRoutingPolicyWrr, RecordSetRoutingPolicyWrrArgs

    Weight double
    The ratio of traffic routed to the target.
    HealthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets
    The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatas or health_checked_targets can be set. Structure is documented below.
    Rrdatas List<string>
    Same as rrdatas above.
    Weight float64
    The ratio of traffic routed to the target.
    HealthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets
    The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatas or health_checked_targets can be set. Structure is documented below.
    Rrdatas []string
    Same as rrdatas above.
    weight Double
    The ratio of traffic routed to the target.
    healthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets
    The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatas or health_checked_targets can be set. Structure is documented below.
    rrdatas List<String>
    Same as rrdatas above.
    weight number
    The ratio of traffic routed to the target.
    healthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets
    The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatas or health_checked_targets can be set. Structure is documented below.
    rrdatas string[]
    Same as rrdatas above.
    weight float
    The ratio of traffic routed to the target.
    health_checked_targets RecordSetRoutingPolicyWrrHealthCheckedTargets
    The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatas or health_checked_targets can be set. Structure is documented below.
    rrdatas Sequence[str]
    Same as rrdatas above.
    weight Number
    The ratio of traffic routed to the target.
    healthCheckedTargets Property Map
    The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatas or health_checked_targets can be set. Structure is documented below.
    rrdatas List<String>
    Same as rrdatas above.

    RecordSetRoutingPolicyWrrHealthCheckedTargets, RecordSetRoutingPolicyWrrHealthCheckedTargetsArgs

    InternalLoadBalancers List<RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer>
    The list of internal load balancers to health check. Structure is documented below.
    InternalLoadBalancers []RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers List<RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer>
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer[]
    The list of internal load balancers to health check. Structure is documented below.
    internal_load_balancers Sequence[RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer]
    The list of internal load balancers to health check. Structure is documented below.
    internalLoadBalancers List<Property Map>
    The list of internal load balancers to health check. Structure is documented below.

    RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer, RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancerArgs

    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    IpAddress string
    The frontend IP address of the load balancer.
    IpProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    NetworkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    Port string
    The configured port of the load balancer.
    Project string
    The ID of the project in which the load balancer belongs.
    LoadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    Region string
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress string
    The frontend IP address of the load balancer.
    ipProtocol string
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl string
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port string
    The configured port of the load balancer.
    project string
    The ID of the project in which the load balancer belongs.
    loadBalancerType string
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region string
    The region of the load balancer. Only needed for regional load balancers.
    ip_address str
    The frontend IP address of the load balancer.
    ip_protocol str
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    network_url str
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port str
    The configured port of the load balancer.
    project str
    The ID of the project in which the load balancer belongs.
    load_balancer_type str
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region str
    The region of the load balancer. Only needed for regional load balancers.
    ipAddress String
    The frontend IP address of the load balancer.
    ipProtocol String
    The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]
    networkUrl String
    The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.
    port String
    The configured port of the load balancer.
    project String
    The ID of the project in which the load balancer belongs.
    loadBalancerType String
    The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb", "regionalL7ilb", "globalL7ilb"]
    region String
    The region of the load balancer. Only needed for regional load balancers.

    Import

    DNS record sets can be imported using either of these accepted formats:

    • projects/{{project}}/managedZones/{{zone}}/rrsets/{{name}}/{{type}}

    • {{project}}/{{zone}}/{{name}}/{{type}}

    • {{zone}}/{{name}}/{{type}}

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

    $ pulumi import gcp:dns/recordSet:RecordSet default projects/{{project}}/managedZones/{{zone}}/rrsets/{{name}}/{{type}}
    
    $ pulumi import gcp:dns/recordSet:RecordSet default {{project}}/{{zone}}/{{name}}/{{type}}
    
    $ pulumi import gcp:dns/recordSet:RecordSet default {{zone}}/{{name}}/{{type}}
    

    Note: The record name must include the trailing dot at the end.

    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 v8.9.3 published on Monday, Nov 18, 2024 by Pulumi