Google Cloud (GCP) Classic

v6.44.0 published on Tuesday, Nov 29, 2022 by Pulumi

RecordSet

Import

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

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

NoteThe record name must include the trailing dot at the end.

Example Usage

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

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var frontendInstance = new Gcp.Compute.Instance("frontendInstance", new()
    {
        MachineType = "g1-small",
        Zone = "us-central1-b",
        BootDisk = new Gcp.Compute.Inputs.InstanceBootDiskArgs
        {
            InitializeParams = new Gcp.Compute.Inputs.InstanceBootDiskInitializeParamsArgs
            {
                Image = "debian-cloud/debian-11",
            },
        },
        NetworkInterfaces = new[]
        {
            new Gcp.Compute.Inputs.InstanceNetworkInterfaceArgs
            {
                Network = "default",
                AccessConfigs = new[]
                {
                    null,
                },
            },
        },
    });

    var prod = new Gcp.Dns.ManagedZone("prod", new()
    {
        DnsName = "prod.mydomain.com.",
    });

    var frontendRecordSet = new Gcp.Dns.RecordSet("frontendRecordSet", new()
    {
        Name = prod.DnsName.Apply(dnsName => $"frontend.{dnsName}"),
        Type = "A",
        Ttl = 300,
        ManagedZone = prod.Name,
        Rrdatas = new[]
        {
            frontendInstance.NetworkInterfaces.Apply(networkInterfaces => networkInterfaces[0].AccessConfigs[0]?.NatIp),
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v6/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, "frontendInstance", &compute.InstanceArgs{
			MachineType: pulumi.String("g1-small"),
			Zone:        pulumi.String("us-central1-b"),
			BootDisk: &compute.InstanceBootDiskArgs{
				InitializeParams: &compute.InstanceBootDiskInitializeParamsArgs{
					Image: pulumi.String("debian-cloud/debian-11"),
				},
			},
			NetworkInterfaces: compute.InstanceNetworkInterfaceArray{
				&compute.InstanceNetworkInterfaceArgs{
					Network: pulumi.String("default"),
					AccessConfigs: compute.InstanceNetworkInterfaceAccessConfigArray{
						nil,
					},
				},
			},
		})
		if err != nil {
			return err
		}
		prod, err := dns.NewManagedZone(ctx, "prod", &dns.ManagedZoneArgs{
			DnsName: pulumi.String("prod.mydomain.com."),
		})
		if err != nil {
			return err
		}
		_, err = dns.NewRecordSet(ctx, "frontendRecordSet", &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{
				frontendInstance.NetworkInterfaces.ApplyT(func(networkInterfaces []compute.InstanceNetworkInterface) (string, error) {
					return networkInterfaces[0].AccessConfigs[0].NatIp, nil
				}).(pulumi.StringOutput),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
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.InstanceBootDiskArgs;
import com.pulumi.gcp.compute.inputs.InstanceBootDiskInitializeParamsArgs;
import com.pulumi.gcp.compute.inputs.InstanceNetworkInterfaceArgs;
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()        
            .machineType("g1-small")
            .zone("us-central1-b")
            .bootDisk(InstanceBootDiskArgs.builder()
                .initializeParams(InstanceBootDiskInitializeParamsArgs.builder()
                    .image("debian-cloud/debian-11")
                    .build())
                .build())
            .networkInterfaces(InstanceNetworkInterfaceArgs.builder()
                .network("default")
                .accessConfigs()
                .build())
            .build());

        var prod = new ManagedZone("prod", ManagedZoneArgs.builder()        
            .dnsName("prod.mydomain.com.")
            .build());

        var frontendRecordSet = new RecordSet("frontendRecordSet", 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());

    }
}
import pulumi
import pulumi_gcp as gcp

frontend_instance = gcp.compute.Instance("frontendInstance",
    machine_type="g1-small",
    zone="us-central1-b",
    boot_disk=gcp.compute.InstanceBootDiskArgs(
        initialize_params=gcp.compute.InstanceBootDiskInitializeParamsArgs(
            image="debian-cloud/debian-11",
        ),
    ),
    network_interfaces=[gcp.compute.InstanceNetworkInterfaceArgs(
        network="default",
        access_configs=[gcp.compute.InstanceNetworkInterfaceAccessConfigArgs()],
    )])
prod = gcp.dns.ManagedZone("prod", dns_name="prod.mydomain.com.")
frontend_record_set = gcp.dns.RecordSet("frontendRecordSet",
    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])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const frontendInstance = new gcp.compute.Instance("frontendInstance", {
    machineType: "g1-small",
    zone: "us-central1-b",
    bootDisk: {
        initializeParams: {
            image: "debian-cloud/debian-11",
        },
    },
    networkInterfaces: [{
        network: "default",
        accessConfigs: [{}],
    }],
});
const prod = new gcp.dns.ManagedZone("prod", {dnsName: "prod.mydomain.com."});
const frontendRecordSet = new gcp.dns.RecordSet("frontendRecordSet", {
    name: pulumi.interpolate`frontend.${prod.dnsName}`,
    type: "A",
    ttl: 300,
    managedZone: prod.name,
    rrdatas: [frontendInstance.networkInterfaces.apply(networkInterfaces => networkInterfaces[0].accessConfigs?[0]?.natIp)],
});
resources:
  frontendRecordSet:
    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
    properties:
      machineType: g1-small
      zone: us-central1-b
      bootDisk:
        initializeParams:
          image: debian-cloud/debian-11
      networkInterfaces:
        - network: default
          accessConfigs:
            - {}
  prod:
    type: gcp:dns:ManagedZone
    properties:
      dnsName: prod.mydomain.com.

Adding an A record

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var prod = new Gcp.Dns.ManagedZone("prod", new()
    {
        DnsName = "prod.mydomain.com.",
    });

    var recordSet = new Gcp.Dns.RecordSet("recordSet", new()
    {
        Name = prod.DnsName.Apply(dnsName => $"backend.{dnsName}"),
        ManagedZone = prod.Name,
        Type = "A",
        Ttl = 300,
        Rrdatas = new[]
        {
            "8.8.8.8",
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			DnsName: pulumi.String("prod.mydomain.com."),
		})
		if err != nil {
			return err
		}
		_, err = dns.NewRecordSet(ctx, "recordSet", &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
	})
}
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()        
            .dnsName("prod.mydomain.com.")
            .build());

        var recordSet = new RecordSet("recordSet", 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());

    }
}
import pulumi
import pulumi_gcp as gcp

prod = gcp.dns.ManagedZone("prod", dns_name="prod.mydomain.com.")
record_set = gcp.dns.RecordSet("recordSet",
    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"])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const prod = new gcp.dns.ManagedZone("prod", {dnsName: "prod.mydomain.com."});
const recordSet = new gcp.dns.RecordSet("recordSet", {
    name: pulumi.interpolate`backend.${prod.dnsName}`,
    managedZone: prod.name,
    type: "A",
    ttl: 300,
    rrdatas: ["8.8.8.8"],
});
resources:
  recordSet:
    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:
      dnsName: prod.mydomain.com.

Adding an MX record

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var prod = new Gcp.Dns.ManagedZone("prod", new()
    {
        DnsName = "prod.mydomain.com.",
    });

    var mx = new Gcp.Dns.RecordSet("mx", new()
    {
        Name = prod.DnsName,
        ManagedZone = prod.Name,
        Type = "MX",
        Ttl = 3600,
        Rrdatas = new[]
        {
            "1 aspmx.l.google.com.",
            "5 alt1.aspmx.l.google.com.",
            "5 alt2.aspmx.l.google.com.",
            "10 alt3.aspmx.l.google.com.",
            "10 alt4.aspmx.l.google.com.",
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			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
	})
}
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()        
            .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());

    }
}
import pulumi
import pulumi_gcp as gcp

prod = gcp.dns.ManagedZone("prod", 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.",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const prod = new gcp.dns.ManagedZone("prod", {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.",
    ],
});
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:
      dnsName: prod.mydomain.com.

Adding an SPF record

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var prod = new Gcp.Dns.ManagedZone("prod", new()
    {
        DnsName = "prod.mydomain.com.",
    });

    var spf = new Gcp.Dns.RecordSet("spf", new()
    {
        Name = prod.DnsName.Apply(dnsName => $"frontend.{dnsName}"),
        ManagedZone = prod.Name,
        Type = "TXT",
        Ttl = 300,
        Rrdatas = new[]
        {
            "\"v=spf1 ip4:111.111.111.111 include:backoff.email-example.com -all\"",
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			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
	})
}
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()        
            .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());

    }
}
import pulumi
import pulumi_gcp as gcp

prod = gcp.dns.ManagedZone("prod", 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\""])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const prod = new gcp.dns.ManagedZone("prod", {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\""],
});
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:
      dnsName: prod.mydomain.com.

Adding a CNAME record

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var prod = new Gcp.Dns.ManagedZone("prod", new()
    {
        DnsName = "prod.mydomain.com.",
    });

    var cname = new Gcp.Dns.RecordSet("cname", new()
    {
        Name = prod.DnsName.Apply(dnsName => $"frontend.{dnsName}"),
        ManagedZone = prod.Name,
        Type = "CNAME",
        Ttl = 300,
        Rrdatas = new[]
        {
            "frontend.mydomain.com.",
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/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{
			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
	})
}
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()        
            .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());

    }
}
import pulumi
import pulumi_gcp as gcp

prod = gcp.dns.ManagedZone("prod", 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."])
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const prod = new gcp.dns.ManagedZone("prod", {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."],
});
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:
      dnsName: prod.mydomain.com.

Geolocation

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var geo = new Gcp.Dns.RecordSet("geo", new()
    {
        Name = $"backend.{google_dns_managed_zone.Prod.Dns_name}",
        ManagedZone = google_dns_managed_zone.Prod.Name,
        Type = "A",
        Ttl = 300,
        RoutingPolicy = new Gcp.Dns.Inputs.RecordSetRoutingPolicyArgs
        {
            Geos = new[]
            {
                new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoArgs
                {
                    Location = "asia-east1",
                    Rrdatas = new[]
                    {
                        "10.128.1.1",
                    },
                },
                new Gcp.Dns.Inputs.RecordSetRoutingPolicyGeoArgs
                {
                    Location = "us-central1",
                    Rrdatas = new[]
                    {
                        "10.130.1.1",
                    },
                },
            },
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/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.String(fmt.Sprintf("backend.%v", google_dns_managed_zone.Prod.Dns_name)),
			ManagedZone: pulumi.Any(google_dns_managed_zone.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
	})
}
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", google_dns_managed_zone.prod().dns_name()))
            .managedZone(google_dns_managed_zone.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());

    }
}
import pulumi
import pulumi_gcp as gcp

geo = gcp.dns.RecordSet("geo",
    name=f"backend.{google_dns_managed_zone['prod']['dns_name']}",
    managed_zone=google_dns_managed_zone["prod"]["name"],
    type="A",
    ttl=300,
    routing_policy=gcp.dns.RecordSetRoutingPolicyArgs(
        geos=[
            gcp.dns.RecordSetRoutingPolicyGeoArgs(
                location="asia-east1",
                rrdatas=["10.128.1.1"],
            ),
            gcp.dns.RecordSetRoutingPolicyGeoArgs(
                location="us-central1",
                rrdatas=["10.130.1.1"],
            ),
        ],
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const geo = new gcp.dns.RecordSet("geo", {
    name: `backend.${google_dns_managed_zone.prod.dns_name}`,
    managedZone: google_dns_managed_zone.prod.name,
    type: "A",
    ttl: 300,
    routingPolicy: {
        geos: [
            {
                location: "asia-east1",
                rrdatas: ["10.128.1.1"],
            },
            {
                location: "us-central1",
                rrdatas: ["10.130.1.1"],
            },
        ],
    },
});
resources:
  geo:
    type: gcp:dns:RecordSet
    properties:
      name: backend.${google_dns_managed_zone.prod.dns_name}
      managedZone: ${google_dns_managed_zone.prod.name}
      type: A
      ttl: 300
      routingPolicy:
        geos:
          - location: asia-east1
            rrdatas:
              - 10.128.1.1
          - location: us-central1
            rrdatas:
              - 10.130.1.1

Primary-Backup

using System.Collections.Generic;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() => 
{
    var prodManagedZone = new Gcp.Dns.ManagedZone("prodManagedZone", new()
    {
        DnsName = "prod.mydomain.com.",
    });

    var prodRegionBackendService = new Gcp.Compute.RegionBackendService("prodRegionBackendService", new()
    {
        Region = "us-central1",
    });

    var prodNetwork = new Gcp.Compute.Network("prodNetwork");

    var prodForwardingRule = new Gcp.Compute.ForwardingRule("prodForwardingRule", new()
    {
        Region = "us-central1",
        LoadBalancingScheme = "INTERNAL",
        BackendService = prodRegionBackendService.Id,
        AllPorts = true,
        Network = prodNetwork.Name,
    });

    var recordSet = new Gcp.Dns.RecordSet("recordSet", new()
    {
        Name = prodManagedZone.DnsName.Apply(dnsName => $"backend.{dnsName}"),
        ManagedZone = prodManagedZone.Name,
        Type = "A",
        Ttl = 300,
        RoutingPolicy = new Gcp.Dns.Inputs.RecordSetRoutingPolicyArgs
        {
            PrimaryBackup = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupArgs
            {
                TrickleRatio = 0.1,
                Primary = new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs
                {
                    InternalLoadBalancers = new[]
                    {
                        new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs
                        {
                            LoadBalancerType = "regionalL4ilb",
                            IpAddress = prodForwardingRule.IpAddress,
                            Port = "80",
                            IpProtocol = "tcp",
                            NetworkUrl = prodNetwork.Id,
                            Project = prodForwardingRule.Project,
                            Region = prodForwardingRule.Region,
                        },
                    },
                },
                BackupGeos = new[]
                {
                    new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs
                    {
                        Location = "asia-east1",
                        Rrdatas = new[]
                        {
                            "10.128.1.1",
                        },
                    },
                    new Gcp.Dns.Inputs.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs
                    {
                        Location = "us-west1",
                        Rrdatas = new[]
                        {
                            "10.130.1.1",
                        },
                    },
                },
            },
        },
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/dns"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		prodManagedZone, err := dns.NewManagedZone(ctx, "prodManagedZone", &dns.ManagedZoneArgs{
			DnsName: pulumi.String("prod.mydomain.com."),
		})
		if err != nil {
			return err
		}
		prodRegionBackendService, err := compute.NewRegionBackendService(ctx, "prodRegionBackendService", &compute.RegionBackendServiceArgs{
			Region: pulumi.String("us-central1"),
		})
		if err != nil {
			return err
		}
		prodNetwork, err := compute.NewNetwork(ctx, "prodNetwork", nil)
		if err != nil {
			return err
		}
		prodForwardingRule, err := compute.NewForwardingRule(ctx, "prodForwardingRule", &compute.ForwardingRuleArgs{
			Region:              pulumi.String("us-central1"),
			LoadBalancingScheme: pulumi.String("INTERNAL"),
			BackendService:      prodRegionBackendService.ID(),
			AllPorts:            pulumi.Bool(true),
			Network:             prodNetwork.Name,
		})
		if err != nil {
			return err
		}
		_, err = dns.NewRecordSet(ctx, "recordSet", &dns.RecordSetArgs{
			Name: prodManagedZone.DnsName.ApplyT(func(dnsName string) (string, error) {
				return fmt.Sprintf("backend.%v", dnsName), nil
			}).(pulumi.StringOutput),
			ManagedZone: prodManagedZone.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
	})
}
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.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 prodManagedZone = new ManagedZone("prodManagedZone", ManagedZoneArgs.builder()        
            .dnsName("prod.mydomain.com.")
            .build());

        var prodRegionBackendService = new RegionBackendService("prodRegionBackendService", RegionBackendServiceArgs.builder()        
            .region("us-central1")
            .build());

        var prodNetwork = new Network("prodNetwork");

        var prodForwardingRule = new ForwardingRule("prodForwardingRule", ForwardingRuleArgs.builder()        
            .region("us-central1")
            .loadBalancingScheme("INTERNAL")
            .backendService(prodRegionBackendService.id())
            .allPorts(true)
            .network(prodNetwork.name())
            .build());

        var recordSet = new RecordSet("recordSet", RecordSetArgs.builder()        
            .name(prodManagedZone.dnsName().applyValue(dnsName -> String.format("backend.%s", dnsName)))
            .managedZone(prodManagedZone.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());

    }
}
import pulumi
import pulumi_gcp as gcp

prod_managed_zone = gcp.dns.ManagedZone("prodManagedZone", dns_name="prod.mydomain.com.")
prod_region_backend_service = gcp.compute.RegionBackendService("prodRegionBackendService", region="us-central1")
prod_network = gcp.compute.Network("prodNetwork")
prod_forwarding_rule = gcp.compute.ForwardingRule("prodForwardingRule",
    region="us-central1",
    load_balancing_scheme="INTERNAL",
    backend_service=prod_region_backend_service.id,
    all_ports=True,
    network=prod_network.name)
record_set = gcp.dns.RecordSet("recordSet",
    name=prod_managed_zone.dns_name.apply(lambda dns_name: f"backend.{dns_name}"),
    managed_zone=prod_managed_zone.name,
    type="A",
    ttl=300,
    routing_policy=gcp.dns.RecordSetRoutingPolicyArgs(
        primary_backup=gcp.dns.RecordSetRoutingPolicyPrimaryBackupArgs(
            trickle_ratio=0.1,
            primary=gcp.dns.RecordSetRoutingPolicyPrimaryBackupPrimaryArgs(
                internal_load_balancers=[gcp.dns.RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancerArgs(
                    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=[
                gcp.dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs(
                    location="asia-east1",
                    rrdatas=["10.128.1.1"],
                ),
                gcp.dns.RecordSetRoutingPolicyPrimaryBackupBackupGeoArgs(
                    location="us-west1",
                    rrdatas=["10.130.1.1"],
                ),
            ],
        ),
    ))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const prodManagedZone = new gcp.dns.ManagedZone("prodManagedZone", {dnsName: "prod.mydomain.com."});
const prodRegionBackendService = new gcp.compute.RegionBackendService("prodRegionBackendService", {region: "us-central1"});
const prodNetwork = new gcp.compute.Network("prodNetwork", {});
const prodForwardingRule = new gcp.compute.ForwardingRule("prodForwardingRule", {
    region: "us-central1",
    loadBalancingScheme: "INTERNAL",
    backendService: prodRegionBackendService.id,
    allPorts: true,
    network: prodNetwork.name,
});
const recordSet = new gcp.dns.RecordSet("recordSet", {
    name: pulumi.interpolate`backend.${prodManagedZone.dnsName}`,
    managedZone: prodManagedZone.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"],
                },
            ],
        },
    },
});
resources:
  recordSet:
    type: gcp:dns:RecordSet
    properties:
      name: backend.${prodManagedZone.dnsName}
      managedZone: ${prodManagedZone.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
  prodManagedZone:
    type: gcp:dns:ManagedZone
    properties:
      dnsName: prod.mydomain.com.
  prodForwardingRule:
    type: gcp:compute:ForwardingRule
    properties:
      region: us-central1
      loadBalancingScheme: INTERNAL
      backendService: ${prodRegionBackendService.id}
      allPorts: true
      network: ${prodNetwork.name}
  prodRegionBackendService:
    type: gcp:compute:RegionBackendService
    properties:
      region: us-central1
  prodNetwork:
    type: gcp:compute:Network

Create RecordSet Resource

new RecordSet(name: string, args: RecordSetArgs, opts?: CustomResourceOptions);
@overload
def RecordSet(resource_name: 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)
@overload
def RecordSet(resource_name: str,
              args: RecordSetArgs,
              opts: Optional[ResourceOptions] = 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.

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

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

The RecordSet resource accepts the following input properties:

ManagedZone string

The name of the zone in which this record set will reside.

Name string

The DNS name this record set will apply to.

Type string

The DNS record set type.

Project string

The ID of the project in which the load balancer belongs.

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 List<string>

Same as rrdatas above.

Ttl int

The time-to-live of this record set (seconds).

ManagedZone string

The name of the zone in which this record set will reside.

Name string

The DNS name this record set will apply to.

Type string

The DNS record set type.

Project string

The ID of the project in which the load balancer belongs.

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

Same as rrdatas above.

Ttl int

The time-to-live of this record set (seconds).

managedZone String

The name of the zone in which this record set will reside.

name String

The DNS name this record set will apply to.

type String

The DNS record set type.

project String

The ID of the project in which the load balancer belongs.

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 List<String>

Same as rrdatas above.

ttl Integer

The time-to-live of this record set (seconds).

managedZone string

The name of the zone in which this record set will reside.

name string

The DNS name this record set will apply to.

type string

The DNS record set type.

project string

The ID of the project in which the load balancer belongs.

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[]

Same as rrdatas above.

ttl number

The time-to-live of this record set (seconds).

managed_zone str

The name of the zone in which this record set will reside.

name str

The DNS name this record set will apply to.

type str

The DNS record set type.

project str

The ID of the project in which the load balancer belongs.

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]

Same as rrdatas above.

ttl int

The time-to-live of this record set (seconds).

managedZone String

The name of the zone in which this record set will reside.

name String

The DNS name this record set will apply to.

type String

The DNS record set type.

project String

The ID of the project in which the load balancer belongs.

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>

Same as rrdatas above.

ttl Number

The time-to-live of this record set (seconds).

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing RecordSet Resource

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

public static get(name: string, id: Input<ID>, state?: RecordSetState, opts?: CustomResourceOptions): RecordSet
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        managed_zone: Optional[str] = None,
        name: Optional[str] = None,
        project: Optional[str] = None,
        routing_policy: Optional[RecordSetRoutingPolicyArgs] = None,
        rrdatas: Optional[Sequence[str]] = None,
        ttl: Optional[int] = None,
        type: Optional[str] = None) -> RecordSet
func GetRecordSet(ctx *Context, name string, id IDInput, state *RecordSetState, opts ...ResourceOption) (*RecordSet, error)
public static RecordSet Get(string name, Input<string> id, RecordSetState? state, CustomResourceOptions? opts = null)
public static RecordSet get(String name, Output<String> id, RecordSetState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
ManagedZone string

The name of the zone in which this record set will reside.

Name string

The DNS name this record set will apply to.

Project string

The ID of the project in which the load balancer belongs.

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 List<string>

Same as rrdatas above.

Ttl int

The time-to-live of this record set (seconds).

Type string

The DNS record set type.

ManagedZone string

The name of the zone in which this record set will reside.

Name string

The DNS name this record set will apply to.

Project string

The ID of the project in which the load balancer belongs.

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

Same as rrdatas above.

Ttl int

The time-to-live of this record set (seconds).

Type string

The DNS record set type.

managedZone String

The name of the zone in which this record set will reside.

name String

The DNS name this record set will apply to.

project String

The ID of the project in which the load balancer belongs.

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 List<String>

Same as rrdatas above.

ttl Integer

The time-to-live of this record set (seconds).

type String

The DNS record set type.

managedZone string

The name of the zone in which this record set will reside.

name string

The DNS name this record set will apply to.

project string

The ID of the project in which the load balancer belongs.

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[]

Same as rrdatas above.

ttl number

The time-to-live of this record set (seconds).

type string

The DNS record set type.

managed_zone str

The name of the zone in which this record set will reside.

name str

The DNS name this record set will apply to.

project str

The ID of the project in which the load balancer belongs.

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]

Same as rrdatas above.

ttl int

The time-to-live of this record set (seconds).

type str

The DNS record set type.

managedZone String

The name of the zone in which this record set will reside.

name String

The DNS name this record set will apply to.

project String

The ID of the project in which the load balancer belongs.

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>

Same as rrdatas above.

ttl Number

The time-to-live of this record set (seconds).

type String

The DNS record set type.

Supporting Types

RecordSetRoutingPolicy

EnableGeoFencing bool

Specifies whether to enable fencing for geo queries.

Geos List<RecordSetRoutingPolicyGeo>

The configuration for Geolocation based routing policy. Structure is document below.

PrimaryBackup RecordSetRoutingPolicyPrimaryBackup

The configuration for a primary-backup 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 document below.

Wrrs List<RecordSetRoutingPolicyWrr>

The configuration for Weighted Round Robin based routing policy. Structure is document below.

EnableGeoFencing bool

Specifies whether to enable fencing for geo queries.

Geos []RecordSetRoutingPolicyGeo

The configuration for Geolocation based routing policy. Structure is document below.

PrimaryBackup RecordSetRoutingPolicyPrimaryBackup

The configuration for a primary-backup 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 document below.

Wrrs []RecordSetRoutingPolicyWrr

The configuration for Weighted Round Robin based routing policy. Structure is document below.

enableGeoFencing Boolean

Specifies whether to enable fencing for geo queries.

geos List<RecordSetRoutingPolicyGeo>

The configuration for Geolocation based routing policy. Structure is document below.

primaryBackup RecordSetRoutingPolicyPrimaryBackup

The configuration for a primary-backup 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 document below.

wrrs List<RecordSetRoutingPolicyWrr>

The configuration for Weighted Round Robin based routing policy. Structure is document below.

enableGeoFencing boolean

Specifies whether to enable fencing for geo queries.

geos RecordSetRoutingPolicyGeo[]

The configuration for Geolocation based routing policy. Structure is document below.

primaryBackup RecordSetRoutingPolicyPrimaryBackup

The configuration for a primary-backup 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 document below.

wrrs RecordSetRoutingPolicyWrr[]

The configuration for Weighted Round Robin based routing policy. Structure is document 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 document below.

primary_backup RecordSetRoutingPolicyPrimaryBackup

The configuration for a primary-backup 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 document below.

wrrs Sequence[RecordSetRoutingPolicyWrr]

The configuration for Weighted Round Robin based routing policy. Structure is document below.

enableGeoFencing Boolean

Specifies whether to enable fencing for geo queries.

geos List<Property Map>

The configuration for Geolocation based routing policy. Structure is document below.

primaryBackup Property Map

The configuration for a primary-backup 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 document below.

wrrs List<Property Map>

The configuration for Weighted Round Robin based routing policy. Structure is document below.

RecordSetRoutingPolicyGeo

Location string

The location name defined in Google Cloud.

HealthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

Rrdatas List<string>

Same as rrdatas above.

Location string

The location name defined in Google Cloud.

HealthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

Rrdatas []string

Same as rrdatas above.

location String

The location name defined in Google Cloud.

healthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas List<String>

Same as rrdatas above.

location string

The location name defined in Google Cloud.

healthCheckedTargets RecordSetRoutingPolicyGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas string[]

Same as rrdatas above.

location str

The location name defined in Google Cloud.

health_checked_targets RecordSetRoutingPolicyGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas Sequence[str]

Same as rrdatas above.

location String

The location name defined in Google Cloud.

healthCheckedTargets Property Map

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas List<String>

Same as rrdatas above.

RecordSetRoutingPolicyGeoHealthCheckedTargets

InternalLoadBalancers List<RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

InternalLoadBalancers []RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer[]

The list of internal load balancers to health check. Structure is document below.

internal_load_balancers Sequence[RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer]

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<Property Map>

The list of internal load balancers to health check. Structure is document below.

RecordSetRoutingPolicyGeoHealthCheckedTargetsInternalLoadBalancer

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

ipAddress string

The frontend IP address of the load balancer.

ipProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port string

The configured port of the load balancer.

project string

The ID of the project in which the load balancer belongs.

region string

The region of the load balancer. Only needed for regional load balancers.

ip_address str

The frontend IP address of the load balancer.

ip_protocol str

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

load_balancer_type str

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

network_url str

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port str

The configured port of the load balancer.

project str

The ID of the project in which the load balancer belongs.

region str

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

RecordSetRoutingPolicyPrimaryBackup

BackupGeos List<RecordSetRoutingPolicyPrimaryBackupBackupGeo>

The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.

Primary RecordSetRoutingPolicyPrimaryBackupPrimary

The list of global primary targets to be health checked. Structure is document below.

EnableGeoFencingForBackups bool

Specifies whether to enable fencing for backup geo queries.

TrickleRatio double

Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.

BackupGeos []RecordSetRoutingPolicyPrimaryBackupBackupGeo

The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.

Primary RecordSetRoutingPolicyPrimaryBackupPrimary

The list of global primary targets to be health checked. Structure is document below.

EnableGeoFencingForBackups bool

Specifies whether to enable fencing for backup geo queries.

TrickleRatio float64

Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.

backupGeos List<RecordSetRoutingPolicyPrimaryBackupBackupGeo>

The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.

primary RecordSetRoutingPolicyPrimaryBackupPrimary

The list of global primary targets to be health checked. Structure is document below.

enableGeoFencingForBackups Boolean

Specifies whether to enable fencing for backup geo queries.

trickleRatio Double

Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.

backupGeos RecordSetRoutingPolicyPrimaryBackupBackupGeo[]

The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.

primary RecordSetRoutingPolicyPrimaryBackupPrimary

The list of global primary targets to be health checked. Structure is document below.

enableGeoFencingForBackups boolean

Specifies whether to enable fencing for backup geo queries.

trickleRatio number

Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.

backup_geos Sequence[RecordSetRoutingPolicyPrimaryBackupBackupGeo]

The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.

primary RecordSetRoutingPolicyPrimaryBackupPrimary

The list of global primary targets to be health checked. Structure is document below.

enable_geo_fencing_for_backups bool

Specifies whether to enable fencing for backup geo queries.

trickle_ratio float

Specifies the percentage of traffic to send to the backup targets even when the primary targets are healthy.

backupGeos List<Property Map>

The backup geo targets, which provide a regional failover policy for the otherwise global primary targets. Structure is document above.

primary Property Map

The list of global primary targets to be health checked. Structure is document 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

Location string

The location name defined in Google Cloud.

HealthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

Rrdatas List<string>

Same as rrdatas above.

Location string

The location name defined in Google Cloud.

HealthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

Rrdatas []string

Same as rrdatas above.

location String

The location name defined in Google Cloud.

healthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas List<String>

Same as rrdatas above.

location string

The location name defined in Google Cloud.

healthCheckedTargets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas string[]

Same as rrdatas above.

location str

The location name defined in Google Cloud.

health_checked_targets RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas Sequence[str]

Same as rrdatas above.

location String

The location name defined in Google Cloud.

healthCheckedTargets Property Map

For A and AAAA types only. The list of targets to be health checked. These can be specified along with rrdatas within this item. Structure is document below.

rrdatas List<String>

Same as rrdatas above.

RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargets

InternalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

InternalLoadBalancers []RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer[]

The list of internal load balancers to health check. Structure is document below.

internal_load_balancers Sequence[RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer]

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<Property Map>

The list of internal load balancers to health check. Structure is document below.

RecordSetRoutingPolicyPrimaryBackupBackupGeoHealthCheckedTargetsInternalLoadBalancer

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

ipAddress string

The frontend IP address of the load balancer.

ipProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port string

The configured port of the load balancer.

project string

The ID of the project in which the load balancer belongs.

region string

The region of the load balancer. Only needed for regional load balancers.

ip_address str

The frontend IP address of the load balancer.

ip_protocol str

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

load_balancer_type str

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

network_url str

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port str

The configured port of the load balancer.

project str

The ID of the project in which the load balancer belongs.

region str

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

RecordSetRoutingPolicyPrimaryBackupPrimary

InternalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

InternalLoadBalancers []RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer[]

The list of internal load balancers to health check. Structure is document below.

internal_load_balancers Sequence[RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer]

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<Property Map>

The list of internal load balancers to health check. Structure is document below.

RecordSetRoutingPolicyPrimaryBackupPrimaryInternalLoadBalancer

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

ipAddress string

The frontend IP address of the load balancer.

ipProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port string

The configured port of the load balancer.

project string

The ID of the project in which the load balancer belongs.

region string

The region of the load balancer. Only needed for regional load balancers.

ip_address str

The frontend IP address of the load balancer.

ip_protocol str

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

load_balancer_type str

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

network_url str

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port str

The configured port of the load balancer.

project str

The ID of the project in which the load balancer belongs.

region str

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

RecordSetRoutingPolicyWrr

Weight double

The ratio of traffic routed to the target.

HealthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets

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 document below.

Rrdatas List<string>

Same as rrdatas above.

Weight float64

The ratio of traffic routed to the target.

HealthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets

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 document below.

Rrdatas []string

Same as rrdatas above.

weight Double

The ratio of traffic routed to the target.

healthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets

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 document below.

rrdatas List<String>

Same as rrdatas above.

weight number

The ratio of traffic routed to the target.

healthCheckedTargets RecordSetRoutingPolicyWrrHealthCheckedTargets

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 document below.

rrdatas string[]

Same as rrdatas above.

weight float

The ratio of traffic routed to the target.

health_checked_targets RecordSetRoutingPolicyWrrHealthCheckedTargets

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 document below.

rrdatas Sequence[str]

Same as rrdatas above.

weight Number

The ratio of traffic routed to the target.

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 document below.

rrdatas List<String>

Same as rrdatas above.

RecordSetRoutingPolicyWrrHealthCheckedTargets

InternalLoadBalancers List<RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

InternalLoadBalancers []RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer>

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer[]

The list of internal load balancers to health check. Structure is document below.

internal_load_balancers Sequence[RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer]

The list of internal load balancers to health check. Structure is document below.

internalLoadBalancers List<Property Map>

The list of internal load balancers to health check. Structure is document below.

RecordSetRoutingPolicyWrrHealthCheckedTargetsInternalLoadBalancer

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

IpAddress string

The frontend IP address of the load balancer.

IpProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

LoadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

NetworkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

Port string

The configured port of the load balancer.

Project string

The ID of the project in which the load balancer belongs.

Region string

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

ipAddress string

The frontend IP address of the load balancer.

ipProtocol string

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType string

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl string

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port string

The configured port of the load balancer.

project string

The ID of the project in which the load balancer belongs.

region string

The region of the load balancer. Only needed for regional load balancers.

ip_address str

The frontend IP address of the load balancer.

ip_protocol str

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

load_balancer_type str

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

network_url str

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port str

The configured port of the load balancer.

project str

The ID of the project in which the load balancer belongs.

region str

The region of the load balancer. Only needed for regional load balancers.

ipAddress String

The frontend IP address of the load balancer.

ipProtocol String

The configured IP protocol of the load balancer. This value is case-sensitive. Possible values: ["tcp", "udp"]

loadBalancerType String

The type of load balancer. This value is case-sensitive. Possible values: ["regionalL4ilb"]

networkUrl String

The fully qualified url of the network in which the load balancer belongs. This should be formatted like projects/{project}/global/networks/{network} or https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}.

port String

The configured port of the load balancer.

project String

The ID of the project in which the load balancer belongs.

region String

The region of the load balancer. Only needed for regional load balancers.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes

This Pulumi package is based on the google-beta Terraform Provider.