gcp.dns.RecordSet
Explore with Pulumi AI
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
Public zone failover
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const http_health_check = new gcp.compute.HealthCheck("http-health-check", {
    name: "http-health-check",
    description: "Health check via http",
    timeoutSec: 5,
    checkIntervalSec: 30,
    healthyThreshold: 4,
    unhealthyThreshold: 5,
    httpHealthCheck: {
        portSpecification: "USE_SERVING_PORT",
    },
});
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,
    routingPolicy: {
        healthCheck: http_health_check.id,
        primaryBackup: {
            trickleRatio: 0.1,
            primary: {
                externalEndpoints: ["10.128.1.1"],
            },
            backupGeos: [{
                location: "us-west1",
                healthCheckedTargets: {
                    externalEndpoints: ["10.130.1.1"],
                },
            }],
        },
    },
});
import pulumi
import pulumi_gcp as gcp
http_health_check = gcp.compute.HealthCheck("http-health-check",
    name="http-health-check",
    description="Health check via http",
    timeout_sec=5,
    check_interval_sec=30,
    healthy_threshold=4,
    unhealthy_threshold=5,
    http_health_check={
        "port_specification": "USE_SERVING_PORT",
    })
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,
    routing_policy={
        "health_check": http_health_check.id,
        "primary_backup": {
            "trickle_ratio": 0.1,
            "primary": {
                "external_endpoints": ["10.128.1.1"],
            },
            "backup_geos": [{
                "location": "us-west1",
                "health_checked_targets": {
                    "external_endpoints": ["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 {
		http_health_check, err := compute.NewHealthCheck(ctx, "http-health-check", &compute.HealthCheckArgs{
			Name:               pulumi.String("http-health-check"),
			Description:        pulumi.String("Health check via http"),
			TimeoutSec:         pulumi.Int(5),
			CheckIntervalSec:   pulumi.Int(30),
			HealthyThreshold:   pulumi.Int(4),
			UnhealthyThreshold: pulumi.Int(5),
			HttpHealthCheck: &compute.HealthCheckHttpHealthCheckArgs{
				PortSpecification: pulumi.String("USE_SERVING_PORT"),
			},
		})
		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, "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{
				HealthCheck: http_health_check.ID(),
				PrimaryBackup: &dns.RecordSetRoutingPolicyPrimaryBackupArgs{
					TrickleRatio: pulumi.Float64(0.1),
					Primary: &dns.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs{
						ExternalEndpoints: pulumi.StringArray{
							pulumi.String("10.128.1.1"),
						},
					},
					BackupGeos: dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArray{
						&dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs{
							Location: pulumi.String("us-west1"),
							HealthCheckedTargets: &dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs{
								ExternalEndpoints: 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 http_health_check = new Gcp.Compute.HealthCheck("http-health-check", new()
    {
        Name = "http-health-check",
        Description = "Health check via http",
        TimeoutSec = 5,
        CheckIntervalSec = 30,
        HealthyThreshold = 4,
        UnhealthyThreshold = 5,
        HttpHealthCheck = new Gcp.Compute.Inputs.HealthCheckHttpHealthCheckArgs
        {
            PortSpecification = "USE_SERVING_PORT",
        },
    });
    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,
        RoutingPolicy = new Gcp.Dns.Inputs.RecordSetRoutingPolicyArgs
        {
            HealthCheck = http_health_check.Id,
            PrimaryBackup = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupArgs
            {
                TrickleRatio = 0.1,
                Primary = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs
                {
                    ExternalEndpoints = new[]
                    {
                        "10.128.1.1",
                    },
                },
                BackupGeos = new[]
                {
                    new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs
                    {
                        Location = "us-west1",
                        HealthCheckedTargets = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs
                        {
                            ExternalEndpoints = 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.compute.HealthCheck;
import com.pulumi.gcp.compute.HealthCheckArgs;
import com.pulumi.gcp.compute.inputs.HealthCheckHttpHealthCheckArgs;
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 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 http_health_check = new HealthCheck("http-health-check", HealthCheckArgs.builder()
            .name("http-health-check")
            .description("Health check via http")
            .timeoutSec(5)
            .checkIntervalSec(30)
            .healthyThreshold(4)
            .unhealthyThreshold(5)
            .httpHealthCheck(HealthCheckHttpHealthCheckArgs.builder()
                .portSpecification("USE_SERVING_PORT")
                .build())
            .build());
        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)
            .routingPolicy(RecordSetRoutingPolicyArgs.builder()
                .healthCheck(http_health_check.id())
                .primaryBackup(RecordSetRoutingPolicyPrimaryBackupArgs.builder()
                    .trickleRatio(0.1)
                    .primary(RecordSetRoutingPolicyPrimaryBackupPrimaryArgs.builder()
                        .externalEndpoints("10.128.1.1")
                        .build())
                    .backupGeos(RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs.builder()
                        .location("us-west1")
                        .healthCheckedTargets(RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs.builder()
                            .externalEndpoints("10.130.1.1")
                            .build())
                        .build())
                    .build())
                .build())
            .build());
    }
}
resources:
  a:
    type: gcp:dns:RecordSet
    properties:
      name: backend.${prod.dnsName}
      managedZone: ${prod.name}
      type: A
      ttl: 300
      routingPolicy:
        healthCheck: ${["http-health-check"].id}
        primaryBackup:
          trickleRatio: 0.1
          primary:
            externalEndpoints:
              - 10.128.1.1
          backupGeos:
            - location: us-west1
              healthCheckedTargets:
                externalEndpoints:
                  - 10.130.1.1
  http-health-check:
    type: gcp:compute:HealthCheck
    properties:
      name: http-health-check
      description: Health check via http
      timeoutSec: 5
      checkIntervalSec: 30
      healthyThreshold: 4
      unhealthyThreshold: 5
      httpHealthCheck:
        portSpecification: USE_SERVING_PORT
  prod:
    type: gcp:dns:ManagedZone
    properties:
      name: prod-zone
      dnsName: prod.mydomain.com.
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
                {
                    ExternalEndpoints = new[]
                    {
                        "string",
                    },
                    InternalLoadBalancers = new[]
                    {
                        new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArgs
                        {
                            IpAddress = "string",
                            IpProtocol = "string",
                            NetworkUrl = "string",
                            Port = "string",
                            Project = "string",
                            LoadBalancerType = "string",
                            Region = "string",
                        },
                    },
                },
                Rrdatas = new[]
                {
                    "string",
                },
            },
        },
        HealthCheck = "string",
        PrimaryBackup = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupArgs
        {
            BackupGeos = new[]
            {
                new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs
                {
                    Location = "string",
                    HealthCheckedTargets = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs
                    {
                        ExternalEndpoints = new[]
                        {
                            "string",
                        },
                        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
            {
                ExternalEndpoints = new[]
                {
                    "string",
                },
                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
                {
                    ExternalEndpoints = new[]
                    {
                        "string",
                    },
                    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{
					ExternalEndpoints: pulumi.StringArray{
						pulumi.String("string"),
					},
					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"),
				},
			},
		},
		HealthCheck: pulumi.String("string"),
		PrimaryBackup: &dns.RecordSetRoutingPolicyPrimaryBackupArgs{
			BackupGeos: dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArray{
				&dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs{
					Location: pulumi.String("string"),
					HealthCheckedTargets: &dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs{
						ExternalEndpoints: pulumi.StringArray{
							pulumi.String("string"),
						},
						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{
				ExternalEndpoints: pulumi.StringArray{
					pulumi.String("string"),
				},
				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{
					ExternalEndpoints: pulumi.StringArray{
						pulumi.String("string"),
					},
					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()
                .externalEndpoints("string")
                .internalLoadBalancers(RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArgs.builder()
                    .ipAddress("string")
                    .ipProtocol("string")
                    .networkUrl("string")
                    .port("string")
                    .project("string")
                    .loadBalancerType("string")
                    .region("string")
                    .build())
                .build())
            .rrdatas("string")
            .build())
        .healthCheck("string")
        .primaryBackup(RecordSetRoutingPolicyPrimaryBackupArgs.builder()
            .backupGeos(RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs.builder()
                .location("string")
                .healthCheckedTargets(RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs.builder()
                    .externalEndpoints("string")
                    .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()
                .externalEndpoints("string")
                .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()
                .externalEndpoints("string")
                .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": {
                "external_endpoints": ["string"],
                "internal_load_balancers": [{
                    "ip_address": "string",
                    "ip_protocol": "string",
                    "network_url": "string",
                    "port": "string",
                    "project": "string",
                    "load_balancer_type": "string",
                    "region": "string",
                }],
            },
            "rrdatas": ["string"],
        }],
        "health_check": "string",
        "primary_backup": {
            "backup_geos": [{
                "location": "string",
                "health_checked_targets": {
                    "external_endpoints": ["string"],
                    "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": {
                "external_endpoints": ["string"],
                "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": {
                "external_endpoints": ["string"],
                "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: {
                externalEndpoints: ["string"],
                internalLoadBalancers: [{
                    ipAddress: "string",
                    ipProtocol: "string",
                    networkUrl: "string",
                    port: "string",
                    project: "string",
                    loadBalancerType: "string",
                    region: "string",
                }],
            },
            rrdatas: ["string"],
        }],
        healthCheck: "string",
        primaryBackup: {
            backupGeos: [{
                location: "string",
                healthCheckedTargets: {
                    externalEndpoints: ["string"],
                    internalLoadBalancers: [{
                        ipAddress: "string",
                        ipProtocol: "string",
                        networkUrl: "string",
                        port: "string",
                        project: "string",
                        loadBalancerType: "string",
                        region: "string",
                    }],
                },
                rrdatas: ["string"],
            }],
            primary: {
                externalEndpoints: ["string"],
                internalLoadBalancers: [{
                    ipAddress: "string",
                    ipProtocol: "string",
                    networkUrl: "string",
                    port: "string",
                    project: "string",
                    loadBalancerType: "string",
                    region: "string",
                }],
            },
            enableGeoFencingForBackups: false,
            trickleRatio: 0,
        },
        wrrs: [{
            weight: 0,
            healthCheckedTargets: {
                externalEndpoints: ["string"],
                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:
                externalEndpoints:
                    - string
                internalLoadBalancers:
                    - ipAddress: string
                      ipProtocol: string
                      loadBalancerType: string
                      networkUrl: string
                      port: string
                      project: string
                      region: string
              location: string
              rrdatas:
                - string
        healthCheck: string
        primaryBackup:
            backupGeos:
                - healthCheckedTargets:
                    externalEndpoints:
                        - string
                    internalLoadBalancers:
                        - ipAddress: string
                          ipProtocol: string
                          loadBalancerType: string
                          networkUrl: string
                          port: string
                          project: string
                          region: string
                  location: string
                  rrdatas:
                    - string
            enableGeoFencingForBackups: false
            primary:
                externalEndpoints:
                    - string
                internalLoadBalancers:
                    - ipAddress: string
                      ipProtocol: string
                      loadBalancerType: string
                      networkUrl: string
                      port: string
                      project: string
                      region: string
            trickleRatio: 0
        wrrs:
            - healthCheckedTargets:
                externalEndpoints:
                    - string
                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 RecordSet Routing Policy 
- 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 RecordSet Routing Policy Args 
- 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 RecordSet Routing Policy 
- 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 RecordSet Routing Policy 
- 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 RecordSet Routing Policy Args 
- 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) -> RecordSetfunc 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)resources:  _:    type: gcp:dns:RecordSet    get:      id: ${id}- 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.
- 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 RecordSet Routing Policy 
- 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 RecordSet Routing Policy Args 
- 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 RecordSet Routing Policy 
- 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 RecordSet Routing Policy 
- 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 RecordSet Routing Policy Args 
- 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        
- EnableGeo boolFencing 
- Specifies whether to enable fencing for geo queries.
- Geos
List<RecordSet Routing Policy Geo> 
- The configuration for Geolocation based routing policy. Structure is documented below.
- HealthCheck string
- Specifies the health check (used with external endpoints).
- PrimaryBackup RecordSet Routing Policy Primary Backup 
- 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<RecordSet Routing Policy Wrr> 
- The configuration for Weighted Round Robin based routing policy. Structure is documented below.
- EnableGeo boolFencing 
- Specifies whether to enable fencing for geo queries.
- Geos
[]RecordSet Routing Policy Geo 
- The configuration for Geolocation based routing policy. Structure is documented below.
- HealthCheck string
- Specifies the health check (used with external endpoints).
- PrimaryBackup RecordSet Routing Policy Primary Backup 
- 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
[]RecordSet Routing Policy Wrr 
- The configuration for Weighted Round Robin based routing policy. Structure is documented below.
- enableGeo BooleanFencing 
- Specifies whether to enable fencing for geo queries.
- geos
List<RecordSet Routing Policy Geo> 
- The configuration for Geolocation based routing policy. Structure is documented below.
- healthCheck String
- Specifies the health check (used with external endpoints).
- primaryBackup RecordSet Routing Policy Primary Backup 
- 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<RecordSet Routing Policy Wrr> 
- The configuration for Weighted Round Robin based routing policy. Structure is documented below.
- enableGeo booleanFencing 
- Specifies whether to enable fencing for geo queries.
- geos
RecordSet Routing Policy Geo[] 
- The configuration for Geolocation based routing policy. Structure is documented below.
- healthCheck string
- Specifies the health check (used with external endpoints).
- primaryBackup RecordSet Routing Policy Primary Backup 
- 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
RecordSet Routing Policy Wrr[] 
- The configuration for Weighted Round Robin based routing policy. Structure is documented below.
- enable_geo_ boolfencing 
- Specifies whether to enable fencing for geo queries.
- geos
Sequence[RecordSet Routing Policy Geo] 
- The configuration for Geolocation based routing policy. Structure is documented below.
- health_check str
- Specifies the health check (used with external endpoints).
- primary_backup RecordSet Routing Policy Primary Backup 
- 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[RecordSet Routing Policy Wrr] 
- The configuration for Weighted Round Robin based routing policy. Structure is documented below.
- enableGeo BooleanFencing 
- Specifies whether to enable fencing for geo queries.
- geos List<Property Map>
- The configuration for Geolocation based routing policy. Structure is documented below.
- healthCheck String
- Specifies the health check (used with external endpoints).
- 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.
- HealthChecked RecordTargets Set Routing Policy Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item. Structure is documented below.
- Rrdatas List<string>
- Same as rrdatasabove.
- Location string
- The location name defined in Google Cloud.
- HealthChecked RecordTargets Set Routing Policy Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item. Structure is documented below.
- Rrdatas []string
- Same as rrdatasabove.
- location String
- The location name defined in Google Cloud.
- healthChecked RecordTargets Set Routing Policy Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item. Structure is documented below.
- rrdatas List<String>
- Same as rrdatasabove.
- location string
- The location name defined in Google Cloud.
- healthChecked RecordTargets Set Routing Policy Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item. Structure is documented below.
- rrdatas string[]
- Same as rrdatasabove.
- location str
- The location name defined in Google Cloud.
- health_checked_ Recordtargets Set Routing Policy Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item. Structure is documented below.
- rrdatas Sequence[str]
- Same as rrdatasabove.
- location String
- The location name defined in Google Cloud.
- healthChecked Property MapTargets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item. Structure is documented below.
- rrdatas List<String>
- Same as rrdatasabove.
RecordSetRoutingPolicyGeoHealthCheckedTargets, RecordSetRoutingPolicyGeoHealthCheckedTargetsArgs                
- ExternalEndpoints List<string>
- The list of external endpoint addresses to health check.
- InternalLoad List<RecordBalancers Set Routing Policy Geo Health Checked Targets Internal Load Balancer> 
- The list of internal load balancers to health check. Structure is documented below.
- ExternalEndpoints []string
- The list of external endpoint addresses to health check.
- InternalLoad []RecordBalancers Set Routing Policy Geo Health Checked Targets Internal Load Balancer 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints List<String>
- The list of external endpoint addresses to health check.
- internalLoad List<RecordBalancers Set Routing Policy Geo Health Checked Targets Internal Load Balancer> 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints string[]
- The list of external endpoint addresses to health check.
- internalLoad RecordBalancers Set Routing Policy Geo Health Checked Targets Internal Load Balancer[] 
- The list of internal load balancers to health check. Structure is documented below.
- external_endpoints Sequence[str]
- The list of external endpoint addresses to health check.
- internal_load_ Sequence[Recordbalancers Set Routing Policy Geo Health Checked Targets Internal Load Balancer] 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints List<String>
- The list of external endpoint addresses to health check.
- internalLoad List<Property Map>Balancers 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- loadBalancer StringType 
- 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}orhttps://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.
- loadBalancer stringType 
- 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}orhttps://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_ strtype 
- 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}orhttps://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.
- loadBalancer StringType 
- 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<RecordSet Routing Policy Primary Backup Backup Geo> 
- The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
- Primary
RecordSet Routing Policy Primary Backup Primary 
- The list of global primary targets to be health checked. Structure is documented below.
- EnableGeo boolFencing For Backups 
- 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 []RecordSet Routing Policy Primary Backup Backup Geo 
- The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
- Primary
RecordSet Routing Policy Primary Backup Primary 
- The list of global primary targets to be health checked. Structure is documented below.
- EnableGeo boolFencing For Backups 
- 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<RecordSet Routing Policy Primary Backup Backup Geo> 
- The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
- primary
RecordSet Routing Policy Primary Backup Primary 
- The list of global primary targets to be health checked. Structure is documented below.
- enableGeo BooleanFencing For Backups 
- 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 RecordSet Routing Policy Primary Backup Backup Geo[] 
- The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
- primary
RecordSet Routing Policy Primary Backup Primary 
- The list of global primary targets to be health checked. Structure is documented below.
- enableGeo booleanFencing For Backups 
- 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[RecordSet Routing Policy Primary Backup Backup Geo] 
- The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.
- primary
RecordSet Routing Policy Primary Backup Primary 
- The list of global primary targets to be health checked. Structure is documented below.
- enable_geo_ boolfencing_ for_ backups 
- 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.
- enableGeo BooleanFencing For Backups 
- 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.
- HealthChecked RecordTargets Set Routing Policy Primary Backup Backup Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item.
- Rrdatas List<string>
- Location string
- The location name defined in Google Cloud.
- HealthChecked RecordTargets Set Routing Policy Primary Backup Backup Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item.
- Rrdatas []string
- location String
- The location name defined in Google Cloud.
- healthChecked RecordTargets Set Routing Policy Primary Backup Backup Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item.
- rrdatas List<String>
- location string
- The location name defined in Google Cloud.
- healthChecked RecordTargets Set Routing Policy Primary Backup Backup Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item.
- rrdatas string[]
- location str
- The location name defined in Google Cloud.
- health_checked_ Recordtargets Set Routing Policy Primary Backup Backup Geo Health Checked Targets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item.
- rrdatas Sequence[str]
- location String
- The location name defined in Google Cloud.
- healthChecked Property MapTargets 
- For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdataswithin this item.
- rrdatas List<String>
RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets, RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs                      
- ExternalEndpoints List<string>
- The list of external endpoint addresses to health check.
- InternalLoad List<RecordBalancers Set Routing Policy Primary Backup Backup Geo Health Checked Targets Internal Load Balancer> 
- The list of internal load balancers to health check. Structure is documented below.
- ExternalEndpoints []string
- The list of external endpoint addresses to health check.
- InternalLoad []RecordBalancers Set Routing Policy Primary Backup Backup Geo Health Checked Targets Internal Load Balancer 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints List<String>
- The list of external endpoint addresses to health check.
- internalLoad List<RecordBalancers Set Routing Policy Primary Backup Backup Geo Health Checked Targets Internal Load Balancer> 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints string[]
- The list of external endpoint addresses to health check.
- internalLoad RecordBalancers Set Routing Policy Primary Backup Backup Geo Health Checked Targets Internal Load Balancer[] 
- The list of internal load balancers to health check. Structure is documented below.
- external_endpoints Sequence[str]
- The list of external endpoint addresses to health check.
- internal_load_ Sequence[Recordbalancers Set Routing Policy Primary Backup Backup Geo Health Checked Targets Internal Load Balancer] 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints List<String>
- The list of external endpoint addresses to health check.
- internalLoad List<Property Map>Balancers 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- loadBalancer StringType 
- 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}orhttps://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.
- loadBalancer stringType 
- 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}orhttps://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_ strtype 
- 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}orhttps://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.
- loadBalancer StringType 
- 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              
- ExternalEndpoints List<string>
- The Internet IP addresses to be health checked.
- InternalLoad List<RecordBalancers Set Routing Policy Primary Backup Primary Internal Load Balancer> 
- The list of internal load balancers to health check.
- ExternalEndpoints []string
- The Internet IP addresses to be health checked.
- InternalLoad []RecordBalancers Set Routing Policy Primary Backup Primary Internal Load Balancer 
- The list of internal load balancers to health check.
- externalEndpoints List<String>
- The Internet IP addresses to be health checked.
- internalLoad List<RecordBalancers Set Routing Policy Primary Backup Primary Internal Load Balancer> 
- The list of internal load balancers to health check.
- externalEndpoints string[]
- The Internet IP addresses to be health checked.
- internalLoad RecordBalancers Set Routing Policy Primary Backup Primary Internal Load Balancer[] 
- The list of internal load balancers to health check.
- external_endpoints Sequence[str]
- The Internet IP addresses to be health checked.
- internal_load_ Sequence[Recordbalancers Set Routing Policy Primary Backup Primary Internal Load Balancer] 
- The list of internal load balancers to health check.
- externalEndpoints List<String>
- The Internet IP addresses to be health checked.
- internalLoad List<Property Map>Balancers 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- loadBalancer StringType 
- 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}orhttps://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.
- loadBalancer stringType 
- 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}orhttps://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_ strtype 
- 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}orhttps://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.
- loadBalancer StringType 
- 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.
- HealthChecked RecordTargets Set Routing Policy Wrr Health Checked Targets 
- The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatasorhealth_checked_targetscan be set. Structure is documented below.
- Rrdatas List<string>
- Same as rrdatasabove.
- Weight float64
- The ratio of traffic routed to the target.
- HealthChecked RecordTargets Set Routing Policy Wrr Health Checked Targets 
- The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatasorhealth_checked_targetscan be set. Structure is documented below.
- Rrdatas []string
- Same as rrdatasabove.
- weight Double
- The ratio of traffic routed to the target.
- healthChecked RecordTargets Set Routing Policy Wrr Health Checked Targets 
- The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatasorhealth_checked_targetscan be set. Structure is documented below.
- rrdatas List<String>
- Same as rrdatasabove.
- weight number
- The ratio of traffic routed to the target.
- healthChecked RecordTargets Set Routing Policy Wrr Health Checked Targets 
- The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatasorhealth_checked_targetscan be set. Structure is documented below.
- rrdatas string[]
- Same as rrdatasabove.
- weight float
- The ratio of traffic routed to the target.
- health_checked_ Recordtargets Set Routing Policy Wrr Health Checked Targets 
- The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatasorhealth_checked_targetscan be set. Structure is documented below.
- rrdatas Sequence[str]
- Same as rrdatasabove.
- weight Number
- The ratio of traffic routed to the target.
- healthChecked Property MapTargets 
- The list of targets to be health checked. Note that if DNSSEC is enabled for this zone, only one of rrdatasorhealth_checked_targetscan be set. Structure is documented below.
- rrdatas List<String>
- Same as rrdatasabove.
RecordSetRoutingPolicyWrrHealthCheckedTargets, RecordSetRoutingPolicyWrrHealthCheckedTargetsArgs                
- ExternalEndpoints List<string>
- The list of external endpoint addresses to health check.
- InternalLoad List<RecordBalancers Set Routing Policy Wrr Health Checked Targets Internal Load Balancer> 
- The list of internal load balancers to health check. Structure is documented below.
- ExternalEndpoints []string
- The list of external endpoint addresses to health check.
- InternalLoad []RecordBalancers Set Routing Policy Wrr Health Checked Targets Internal Load Balancer 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints List<String>
- The list of external endpoint addresses to health check.
- internalLoad List<RecordBalancers Set Routing Policy Wrr Health Checked Targets Internal Load Balancer> 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints string[]
- The list of external endpoint addresses to health check.
- internalLoad RecordBalancers Set Routing Policy Wrr Health Checked Targets Internal Load Balancer[] 
- The list of internal load balancers to health check. Structure is documented below.
- external_endpoints Sequence[str]
- The list of external endpoint addresses to health check.
- internal_load_ Sequence[Recordbalancers Set Routing Policy Wrr Health Checked Targets Internal Load Balancer] 
- The list of internal load balancers to health check. Structure is documented below.
- externalEndpoints List<String>
- The list of external endpoint addresses to health check.
- internalLoad List<Property Map>Balancers 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- LoadBalancer stringType 
- 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}orhttps://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.
- loadBalancer StringType 
- 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}orhttps://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.
- loadBalancer stringType 
- 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}orhttps://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_ strtype 
- 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}orhttps://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.
- loadBalancer StringType 
- 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-betaTerraform Provider.