1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. dns
  5. RecordSet
Google Cloud v8.23.0 published on Monday, Mar 24, 2025 by Pulumi

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)],
});
Copy
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])
Copy
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
	})
}
Copy
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),
        },
    });

});
Copy
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());

    }
}
Copy
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.
Copy

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"],
});
Copy
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"])
Copy
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
	})
}
Copy
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",
        },
    });

});
Copy
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());

    }
}
Copy
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.
Copy

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.",
    ],
});
Copy
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.",
    ])
Copy
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
	})
}
Copy
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.",
        },
    });

});
Copy
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());

    }
}
Copy
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.
Copy

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\""],
});
Copy
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\""])
Copy
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
	})
}
Copy
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\"",
        },
    });

});
Copy
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());

    }
}
Copy
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.
Copy

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."],
});
Copy
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."])
Copy
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
	})
}
Copy
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.",
        },
    });

});
Copy
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());

    }
}
Copy
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.
Copy

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"],
            },
        ],
    },
});
Copy
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"],
            },
        ],
    })
Copy
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
	})
}
Copy
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",
                    },
                },
            },
        },
    });

});
Copy
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());

    }
}
Copy
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
Copy

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"],
                },
            ],
        },
    },
});
Copy
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"],
                },
            ],
        },
    })
Copy
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
	})
}
Copy
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",
                        },
                    },
                },
            },
        },
    });

});
Copy
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());

    }
}
Copy
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
Copy

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"],
                },
            }],
        },
    },
});
Copy
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"],
                },
            }],
        },
    })
Copy
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
	})
}
Copy
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",
                            },
                        },
                    },
                },
            },
        },
    });

});
Copy
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());

    }
}
Copy
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.
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. RecordSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. RecordSetArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. RecordSetArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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,
});
Copy
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),
})
Copy
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());
Copy
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)
Copy
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,
});
Copy
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
Copy

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
This property is required.
Changes to this property will trigger replacement.
string
The name of the zone in which this record set will reside.
Name
This property is required.
Changes to this property will trigger replacement.
string
The DNS name this record set will apply to.
Type This property is required. string
The DNS record set type.


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


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


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


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


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


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

Outputs

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

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

Look up Existing RecordSet Resource

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

public static get(name: string, id: Input<ID>, state?: RecordSetState, opts?: CustomResourceOptions): RecordSet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        managed_zone: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        routing_policy: Optional[RecordSetRoutingPolicyArgs] = None,
        rrdatas: Optional[Sequence[str]] = None,
        ttl: Optional[int] = None,
        type: Optional[str] = None) -> RecordSet
func GetRecordSet(ctx *Context, name string, id IDInput, state *RecordSetState, opts ...ResourceOption) (*RecordSet, error)
public static RecordSet Get(string name, Input<string> id, RecordSetState? state, CustomResourceOptions? opts = null)
public static RecordSet get(String name, Output<String> id, RecordSetState state, CustomResourceOptions options)
resources:  _:    type: gcp:dns:RecordSet    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ManagedZone Changes to this property will trigger replacement. string
The name of the zone in which this record set will reside.
Name Changes to this property will trigger replacement. string
The DNS name this record set will apply to.
Project Changes to this property will trigger replacement. string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
RoutingPolicy RecordSetRoutingPolicy
The configuration for steering traffic based on query. Now you can specify either Weighted Round Robin(WRR) type or Geolocation(GEO) type. Structure is documented below.
Rrdatas List<string>
Ttl int
The time-to-live of this record set (seconds).
Type string
The DNS record set type.


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


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


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


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


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


Supporting Types

RecordSetRoutingPolicy
, RecordSetRoutingPolicyArgs

EnableGeoFencing bool
Specifies whether to enable fencing for geo queries.
Geos List<RecordSetRoutingPolicyGeo>
The configuration for Geolocation based routing policy. Structure is documented below.
HealthCheck Changes to this property will trigger replacement. string
Specifies the health check (used with external endpoints).
PrimaryBackup RecordSetRoutingPolicyPrimaryBackup
The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
Wrrs List<RecordSetRoutingPolicyWrr>
The configuration for Weighted Round Robin based routing policy. Structure is documented below.
EnableGeoFencing bool
Specifies whether to enable fencing for geo queries.
Geos []RecordSetRoutingPolicyGeo
The configuration for Geolocation based routing policy. Structure is documented below.
HealthCheck Changes to this property will trigger replacement. string
Specifies the health check (used with external endpoints).
PrimaryBackup RecordSetRoutingPolicyPrimaryBackup
The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
Wrrs []RecordSetRoutingPolicyWrr
The configuration for Weighted Round Robin based routing policy. Structure is documented below.
enableGeoFencing Boolean
Specifies whether to enable fencing for geo queries.
geos List<RecordSetRoutingPolicyGeo>
The configuration for Geolocation based routing policy. Structure is documented below.
healthCheck Changes to this property will trigger replacement. String
Specifies the health check (used with external endpoints).
primaryBackup RecordSetRoutingPolicyPrimaryBackup
The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
wrrs List<RecordSetRoutingPolicyWrr>
The configuration for Weighted Round Robin based routing policy. Structure is documented below.
enableGeoFencing boolean
Specifies whether to enable fencing for geo queries.
geos RecordSetRoutingPolicyGeo[]
The configuration for Geolocation based routing policy. Structure is documented below.
healthCheck Changes to this property will trigger replacement. string
Specifies the health check (used with external endpoints).
primaryBackup RecordSetRoutingPolicyPrimaryBackup
The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
wrrs RecordSetRoutingPolicyWrr[]
The configuration for Weighted Round Robin based routing policy. Structure is documented below.
enable_geo_fencing bool
Specifies whether to enable fencing for geo queries.
geos Sequence[RecordSetRoutingPolicyGeo]
The configuration for Geolocation based routing policy. Structure is documented below.
health_check Changes to this property will trigger replacement. str
Specifies the health check (used with external endpoints).
primary_backup RecordSetRoutingPolicyPrimaryBackup
The configuration for a failover policy with global to regional failover. Queries are responded to with the global primary targets, but if none of the primary targets are healthy, then we fallback to a regional failover policy. Structure is documented below.
wrrs Sequence[RecordSetRoutingPolicyWrr]
The configuration for Weighted Round Robin based routing policy. Structure is documented below.
enableGeoFencing Boolean
Specifies whether to enable fencing for geo queries.
geos List<Property Map>
The configuration for Geolocation based routing policy. Structure is documented below.
healthCheck Changes to this property will trigger replacement. 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 This property is required. string
The location name defined in Google Cloud.
HealthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
Rrdatas List<string>
Same as rrdatas above.
Location This property is required. string
The location name defined in Google Cloud.
HealthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
Rrdatas []string
Same as rrdatas above.
location This property is required. String
The location name defined in Google Cloud.
healthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
rrdatas List<String>
Same as rrdatas above.
location This property is required. string
The location name defined in Google Cloud.
healthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets
For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
rrdatas string[]
Same as rrdatas above.
location This property is required. str
The location name defined in Google Cloud.
health_checked_targets RecordSetRoutingPolicyGeoHealthCheckedTargets
For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
rrdatas Sequence[str]
Same as rrdatas above.
location This property is required. String
The location name defined in Google Cloud.
healthCheckedTargets Property Map
For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is documented below.
rrdatas List<String>
Same as rrdatas above.

RecordSetRoutingPolicyGeoHealthCheckedTargets
, RecordSetRoutingPolicyGeoHealthCheckedTargetsArgs

ExternalEndpoints List<string>
The list of external endpoint addresses to health check.
InternalLoadBalancers List<RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer>
The list of internal load balancers to health check. Structure is documented below.
ExternalEndpoints []string
The list of external endpoint addresses to health check.
InternalLoadBalancers []RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer
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.
internalLoadBalancers List<RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer>
The list of internal load balancers to health check. Structure is documented below.
externalEndpoints string[]
The list of external endpoint addresses to health check.
internalLoadBalancers RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer[]
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_balancers Sequence[RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer]
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.
internalLoadBalancers List<Property Map>
The list of internal load balancers to health check. Structure is documented below.

RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer
, RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancerArgs

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

RecordSetRoutingPolicyPrimaryBackup
, RecordSetRoutingPolicyPrimaryBackupArgs

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

RecordSetRoutingPolicyPrimaryBackupBackupGeo
, RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs

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

RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets
, RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsArgs

ExternalEndpoints List<string>
The list of external endpoint addresses to health check.
InternalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer>
The list of internal load balancers to health check. Structure is documented below.
ExternalEndpoints []string
The list of external endpoint addresses to health check.
InternalLoadBalancers []RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer
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.
internalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer>
The list of internal load balancers to health check. Structure is documented below.
externalEndpoints string[]
The list of external endpoint addresses to health check.
internalLoadBalancers RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer[]
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_balancers Sequence[RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer]
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.
internalLoadBalancers List<Property Map>
The list of internal load balancers to health check. Structure is documented below.

RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer
, RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancerArgs

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

RecordSetRoutingPolicyPrimaryBackupPrimary
, RecordSetRoutingPolicyPrimaryBackupPrimaryArgs

ExternalEndpoints List<string>
The Internet IP addresses to be health checked.
InternalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer>
The list of internal load balancers to health check.
ExternalEndpoints []string
The Internet IP addresses to be health checked.
InternalLoadBalancers []RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer
The list of internal load balancers to health check.
externalEndpoints List<String>
The Internet IP addresses to be health checked.
internalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer>
The list of internal load balancers to health check.
externalEndpoints string[]
The Internet IP addresses to be health checked.
internalLoadBalancers RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer[]
The list of internal load balancers to health check.
external_endpoints Sequence[str]
The Internet IP addresses to be health checked.
internal_load_balancers Sequence[RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer]
The list of internal load balancers to health check.
externalEndpoints List<String>
The Internet IP addresses to be health checked.
internalLoadBalancers List<Property Map>
The list of internal load balancers to health check.

RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer
, RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs

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

RecordSetRoutingPolicyWrr
, RecordSetRoutingPolicyWrrArgs

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

RecordSetRoutingPolicyWrrHealthCheckedTargets
, RecordSetRoutingPolicyWrrHealthCheckedTargetsArgs

ExternalEndpoints List<string>
The list of external endpoint addresses to health check.
InternalLoadBalancers List<RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer>
The list of internal load balancers to health check. Structure is documented below.
ExternalEndpoints []string
The list of external endpoint addresses to health check.
InternalLoadBalancers []RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer
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.
internalLoadBalancers List<RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer>
The list of internal load balancers to health check. Structure is documented below.
externalEndpoints string[]
The list of external endpoint addresses to health check.
internalLoadBalancers RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer[]
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_balancers Sequence[RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer]
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.
internalLoadBalancers List<Property Map>
The list of internal load balancers to health check. Structure is documented below.

RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer
, RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancerArgs

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

Import

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

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

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

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

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

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

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

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

Package Details

Repository
Google Cloud (GCP) Classic pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.