Backup class

An AlloyDB Backup.

To get more information about Backup, see:

Example Usage

Alloydb Backup Basic

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultNetwork = new gcp.compute.Network("default", {name: "alloydb-network"});
const defaultCluster = new gcp.alloydb.Cluster("default", {
    clusterId: "alloydb-cluster",
    location: "us-central1",
    networkConfig: {
        network: defaultNetwork.id,
    },
    deletionProtection: false,
});
const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
    name: "alloydb-cluster",
    addressType: "INTERNAL",
    purpose: "VPC_PEERING",
    prefixLength: 16,
    network: defaultNetwork.id,
});
const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
    network: defaultNetwork.id,
    service: "servicenetworking.googleapis.com",
    reservedPeeringRanges: [privateIpAlloc.name],
});
const defaultInstance = new gcp.alloydb.Instance("default", {
    cluster: defaultCluster.name,
    instanceId: "alloydb-instance",
    instanceType: "PRIMARY",
}, {
    dependsOn: [vpcConnection],
});
const _default = new gcp.alloydb.Backup("default", {
    location: "us-central1",
    backupId: "alloydb-backup",
    clusterName: defaultCluster.name,
}, {
    dependsOn: [defaultInstance],
});
import pulumi
import pulumi_gcp as gcp

default_network = gcp.compute.Network("default", name="alloydb-network")
default_cluster = gcp.alloydb.Cluster("default",
    cluster_id="alloydb-cluster",
    location="us-central1",
    network_config={
        "network": default_network.id,
    },
    deletion_protection=False)
private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
    name="alloydb-cluster",
    address_type="INTERNAL",
    purpose="VPC_PEERING",
    prefix_length=16,
    network=default_network.id)
vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
    network=default_network.id,
    service="servicenetworking.googleapis.com",
    reserved_peering_ranges=[private_ip_alloc.name])
default_instance = gcp.alloydb.Instance("default",
    cluster=default_cluster.name,
    instance_id="alloydb-instance",
    instance_type="PRIMARY",
    opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
default = gcp.alloydb.Backup("default",
    location="us-central1",
    backup_id="alloydb-backup",
    cluster_name=default_cluster.name,
    opts = pulumi.ResourceOptions(depends_on=[default_instance]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var defaultNetwork = new Gcp.Compute.Network("default", new()
    {
        Name = "alloydb-network",
    });

    var defaultCluster = new Gcp.Alloydb.Cluster("default", new()
    {
        ClusterId = "alloydb-cluster",
        Location = "us-central1",
        NetworkConfig = new Gcp.Alloydb.Inputs.ClusterNetworkConfigArgs
        {
            Network = defaultNetwork.Id,
        },
        DeletionProtection = false,
    });

    var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
    {
        Name = "alloydb-cluster",
        AddressType = "INTERNAL",
        Purpose = "VPC_PEERING",
        PrefixLength = 16,
        Network = defaultNetwork.Id,
    });

    var vpcConnection = new Gcp.ServiceNetworking.Connection("vpc_connection", new()
    {
        Network = defaultNetwork.Id,
        Service = "servicenetworking.googleapis.com",
        ReservedPeeringRanges = new[]
        {
            privateIpAlloc.Name,
        },
    });

    var defaultInstance = new Gcp.Alloydb.Instance("default", new()
    {
        Cluster = defaultCluster.Name,
        InstanceId = "alloydb-instance",
        InstanceType = "PRIMARY",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            vpcConnection,
        },
    });

    var @default = new Gcp.Alloydb.Backup("default", new()
    {
        Location = "us-central1",
        BackupId = "alloydb-backup",
        ClusterName = defaultCluster.Name,
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            defaultInstance,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/alloydb"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/servicenetworking"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
			Name: pulumi.String("alloydb-network"),
		})
		if err != nil {
			return err
		}
		defaultCluster, err := alloydb.NewCluster(ctx, "default", &alloydb.ClusterArgs{
			ClusterId: pulumi.String("alloydb-cluster"),
			Location:  pulumi.String("us-central1"),
			NetworkConfig: &alloydb.ClusterNetworkConfigArgs{
				Network: defaultNetwork.ID().ToIDOutput().ToStringOutput(),
			},
			DeletionProtection: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
			Name:         pulumi.String("alloydb-cluster"),
			AddressType:  pulumi.String("INTERNAL"),
			Purpose:      pulumi.String("VPC_PEERING"),
			PrefixLength: pulumi.Int(16),
			Network:      defaultNetwork.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		vpcConnection, err := servicenetworking.NewConnection(ctx, "vpc_connection", &servicenetworking.ConnectionArgs{
			Network: defaultNetwork.ID().ToIDOutput().ToStringOutput(),
			Service: pulumi.String("servicenetworking.googleapis.com"),
			ReservedPeeringRanges: pulumi.StringArray{
				privateIpAlloc.Name,
			},
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alloydb.NewInstance(ctx, "default", &alloydb.InstanceArgs{
			Cluster:      defaultCluster.Name,
			InstanceId:   pulumi.String("alloydb-instance"),
			InstanceType: pulumi.String("PRIMARY"),
		}, pulumi.DependsOn([]pulumi.Resource{
			vpcConnection,
		}))
		if err != nil {
			return err
		}
		_, err = alloydb.NewBackup(ctx, "default", &alloydb.BackupArgs{
			Location:    pulumi.String("us-central1"),
			BackupId:    pulumi.String("alloydb-backup"),
			ClusterName: defaultCluster.Name,
		}, pulumi.DependsOn([]pulumi.Resource{
			defaultInstance,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_alloydb_backup" "default" {
  depends_on   = [gcp_alloydb_instance.default]
  location     = "us-central1"
  backup_id    = "alloydb-backup"
  cluster_name = gcp_alloydb_cluster.default.name
}
resource "gcp_alloydb_cluster" "default" {
  cluster_id = "alloydb-cluster"
  location   = "us-central1"
  network_config = {
    network = gcp_compute_network.default.id
  }
  deletion_protection = false
}
resource "gcp_alloydb_instance" "default" {
  depends_on    = [gcp_servicenetworking_connection.vpc_connection]
  cluster       = gcp_alloydb_cluster.default.name
  instance_id   = "alloydb-instance"
  instance_type = "PRIMARY"
}
resource "gcp_compute_globaladdress" "private_ip_alloc" {
  name          = "alloydb-cluster"
  address_type  = "INTERNAL"
  purpose       = "VPC_PEERING"
  prefix_length = 16
  network       = gcp_compute_network.default.id
}
resource "gcp_servicenetworking_connection" "vpc_connection" {
  network                 = gcp_compute_network.default.id
  service                 = "servicenetworking.googleapis.com"
  reserved_peering_ranges = [gcp_compute_globaladdress.private_ip_alloc.name]
}
resource "gcp_compute_network" "default" {
  name = "alloydb-network"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.alloydb.Cluster;
import com.pulumi.gcp.alloydb.ClusterArgs;
import com.pulumi.gcp.alloydb.inputs.ClusterNetworkConfigArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.alloydb.Instance;
import com.pulumi.gcp.alloydb.InstanceArgs;
import com.pulumi.gcp.alloydb.Backup;
import com.pulumi.gcp.alloydb.BackupArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .name("alloydb-network")
            .build());

        var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
            .clusterId("alloydb-cluster")
            .location("us-central1")
            .networkConfig(ClusterNetworkConfigArgs.builder()
                .network(defaultNetwork.id())
                .build())
            .deletionProtection(false)
            .build());

        var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
            .name("alloydb-cluster")
            .addressType("INTERNAL")
            .purpose("VPC_PEERING")
            .prefixLength(16)
            .network(defaultNetwork.id())
            .build());

        var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
            .network(defaultNetwork.id())
            .service("servicenetworking.googleapis.com")
            .reservedPeeringRanges(privateIpAlloc.name())
            .build());

        var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
            .cluster(defaultCluster.name())
            .instanceId("alloydb-instance")
            .instanceType("PRIMARY")
            .build(), CustomResourceOptions.builder()
                .dependsOn(vpcConnection)
                .build());

        var default_ = new Backup("default", BackupArgs.builder()
            .location("us-central1")
            .backupId("alloydb-backup")
            .clusterName(defaultCluster.name())
            .build(), CustomResourceOptions.builder()
                .dependsOn(defaultInstance)
                .build());

    }
}
resources:
  default:
    type: gcp:alloydb:Backup
    properties:
      location: us-central1
      backupId: alloydb-backup
      clusterName: ${defaultCluster.name}
    options:
      dependsOn:
        - ${defaultInstance}
  defaultCluster:
    type: gcp:alloydb:Cluster
    name: default
    properties:
      clusterId: alloydb-cluster
      location: us-central1
      networkConfig:
        network: ${defaultNetwork.id}
      deletionProtection: false
  defaultInstance:
    type: gcp:alloydb:Instance
    name: default
    properties:
      cluster: ${defaultCluster.name}
      instanceId: alloydb-instance
      instanceType: PRIMARY
    options:
      dependsOn:
        - ${vpcConnection}
  privateIpAlloc:
    type: gcp:compute:GlobalAddress
    name: private_ip_alloc
    properties:
      name: alloydb-cluster
      addressType: INTERNAL
      purpose: VPC_PEERING
      prefixLength: 16
      network: ${defaultNetwork.id}
  vpcConnection:
    type: gcp:servicenetworking:Connection
    name: vpc_connection
    properties:
      network: ${defaultNetwork.id}
      service: servicenetworking.googleapis.com
      reservedPeeringRanges:
        - ${privateIpAlloc.name}
  defaultNetwork:
    type: gcp:compute:Network
    name: default
    properties:
      name: alloydb-network

Alloydb Backup Full

import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";

const defaultNetwork = new gcp.compute.Network("default", {name: "alloydb-network"});
const defaultCluster = new gcp.alloydb.Cluster("default", {
    clusterId: "alloydb-cluster",
    location: "us-central1",
    networkConfig: {
        network: defaultNetwork.id,
    },
    deletionProtection: false,
});
const privateIpAlloc = new gcp.compute.GlobalAddress("private_ip_alloc", {
    name: "alloydb-cluster",
    addressType: "INTERNAL",
    purpose: "VPC_PEERING",
    prefixLength: 16,
    network: defaultNetwork.id,
});
const vpcConnection = new gcp.servicenetworking.Connection("vpc_connection", {
    network: defaultNetwork.id,
    service: "servicenetworking.googleapis.com",
    reservedPeeringRanges: [privateIpAlloc.name],
});
const defaultInstance = new gcp.alloydb.Instance("default", {
    cluster: defaultCluster.name,
    instanceId: "alloydb-instance",
    instanceType: "PRIMARY",
}, {
    dependsOn: [vpcConnection],
});
const _default = new gcp.alloydb.Backup("default", {
    location: "us-central1",
    backupId: "alloydb-backup",
    clusterName: defaultCluster.name,
    description: "example description",
    type: "ON_DEMAND",
    labels: {
        label: "key",
    },
}, {
    dependsOn: [defaultInstance],
});
import pulumi
import pulumi_gcp as gcp

default_network = gcp.compute.Network("default", name="alloydb-network")
default_cluster = gcp.alloydb.Cluster("default",
    cluster_id="alloydb-cluster",
    location="us-central1",
    network_config={
        "network": default_network.id,
    },
    deletion_protection=False)
private_ip_alloc = gcp.compute.GlobalAddress("private_ip_alloc",
    name="alloydb-cluster",
    address_type="INTERNAL",
    purpose="VPC_PEERING",
    prefix_length=16,
    network=default_network.id)
vpc_connection = gcp.servicenetworking.Connection("vpc_connection",
    network=default_network.id,
    service="servicenetworking.googleapis.com",
    reserved_peering_ranges=[private_ip_alloc.name])
default_instance = gcp.alloydb.Instance("default",
    cluster=default_cluster.name,
    instance_id="alloydb-instance",
    instance_type="PRIMARY",
    opts = pulumi.ResourceOptions(depends_on=[vpc_connection]))
default = gcp.alloydb.Backup("default",
    location="us-central1",
    backup_id="alloydb-backup",
    cluster_name=default_cluster.name,
    description="example description",
    type="ON_DEMAND",
    labels={
        "label": "key",
    },
    opts = pulumi.ResourceOptions(depends_on=[default_instance]))
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;

return await Deployment.RunAsync(() =>
{
    var defaultNetwork = new Gcp.Compute.Network("default", new()
    {
        Name = "alloydb-network",
    });

    var defaultCluster = new Gcp.Alloydb.Cluster("default", new()
    {
        ClusterId = "alloydb-cluster",
        Location = "us-central1",
        NetworkConfig = new Gcp.Alloydb.Inputs.ClusterNetworkConfigArgs
        {
            Network = defaultNetwork.Id,
        },
        DeletionProtection = false,
    });

    var privateIpAlloc = new Gcp.Compute.GlobalAddress("private_ip_alloc", new()
    {
        Name = "alloydb-cluster",
        AddressType = "INTERNAL",
        Purpose = "VPC_PEERING",
        PrefixLength = 16,
        Network = defaultNetwork.Id,
    });

    var vpcConnection = new Gcp.ServiceNetworking.Connection("vpc_connection", new()
    {
        Network = defaultNetwork.Id,
        Service = "servicenetworking.googleapis.com",
        ReservedPeeringRanges = new[]
        {
            privateIpAlloc.Name,
        },
    });

    var defaultInstance = new Gcp.Alloydb.Instance("default", new()
    {
        Cluster = defaultCluster.Name,
        InstanceId = "alloydb-instance",
        InstanceType = "PRIMARY",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            vpcConnection,
        },
    });

    var @default = new Gcp.Alloydb.Backup("default", new()
    {
        Location = "us-central1",
        BackupId = "alloydb-backup",
        ClusterName = defaultCluster.Name,
        Description = "example description",
        Type = "ON_DEMAND",
        Labels =
        {
            { "label", "key" },
        },
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            defaultInstance,
        },
    });

});
package main

import (
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/alloydb"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/compute"
	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/servicenetworking"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		defaultNetwork, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
			Name: pulumi.String("alloydb-network"),
		})
		if err != nil {
			return err
		}
		defaultCluster, err := alloydb.NewCluster(ctx, "default", &alloydb.ClusterArgs{
			ClusterId: pulumi.String("alloydb-cluster"),
			Location:  pulumi.String("us-central1"),
			NetworkConfig: &alloydb.ClusterNetworkConfigArgs{
				Network: defaultNetwork.ID().ToIDOutput().ToStringOutput(),
			},
			DeletionProtection: pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		privateIpAlloc, err := compute.NewGlobalAddress(ctx, "private_ip_alloc", &compute.GlobalAddressArgs{
			Name:         pulumi.String("alloydb-cluster"),
			AddressType:  pulumi.String("INTERNAL"),
			Purpose:      pulumi.String("VPC_PEERING"),
			PrefixLength: pulumi.Int(16),
			Network:      defaultNetwork.ID().ToIDOutput().ToStringOutput(),
		})
		if err != nil {
			return err
		}
		vpcConnection, err := servicenetworking.NewConnection(ctx, "vpc_connection", &servicenetworking.ConnectionArgs{
			Network: defaultNetwork.ID().ToIDOutput().ToStringOutput(),
			Service: pulumi.String("servicenetworking.googleapis.com"),
			ReservedPeeringRanges: pulumi.StringArray{
				privateIpAlloc.Name,
			},
		})
		if err != nil {
			return err
		}
		defaultInstance, err := alloydb.NewInstance(ctx, "default", &alloydb.InstanceArgs{
			Cluster:      defaultCluster.Name,
			InstanceId:   pulumi.String("alloydb-instance"),
			InstanceType: pulumi.String("PRIMARY"),
		}, pulumi.DependsOn([]pulumi.Resource{
			vpcConnection,
		}))
		if err != nil {
			return err
		}
		_, err = alloydb.NewBackup(ctx, "default", &alloydb.BackupArgs{
			Location:    pulumi.String("us-central1"),
			BackupId:    pulumi.String("alloydb-backup"),
			ClusterName: defaultCluster.Name,
			Description: pulumi.String("example description"),
			Type:        pulumi.String("ON_DEMAND"),
			Labels: pulumi.StringMap{
				"label": pulumi.String("key"),
			},
		}, pulumi.DependsOn([]pulumi.Resource{
			defaultInstance,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
pulumi {
  required_providers {
    gcp = {
      source = "pulumi/gcp"
    }
  }
}

resource "gcp_alloydb_backup" "default" {
  depends_on   = [gcp_alloydb_instance.default]
  location     = "us-central1"
  backup_id    = "alloydb-backup"
  cluster_name = gcp_alloydb_cluster.default.name
  description  = "example description"
  type         = "ON_DEMAND"
  labels = {
    "label" = "key"
  }
}
resource "gcp_alloydb_cluster" "default" {
  cluster_id = "alloydb-cluster"
  location   = "us-central1"
  network_config = {
    network = gcp_compute_network.default.id
  }
  deletion_protection = false
}
resource "gcp_alloydb_instance" "default" {
  depends_on    = [gcp_servicenetworking_connection.vpc_connection]
  cluster       = gcp_alloydb_cluster.default.name
  instance_id   = "alloydb-instance"
  instance_type = "PRIMARY"
}
resource "gcp_compute_globaladdress" "private_ip_alloc" {
  name          = "alloydb-cluster"
  address_type  = "INTERNAL"
  purpose       = "VPC_PEERING"
  prefix_length = 16
  network       = gcp_compute_network.default.id
}
resource "gcp_servicenetworking_connection" "vpc_connection" {
  network                 = gcp_compute_network.default.id
  service                 = "servicenetworking.googleapis.com"
  reserved_peering_ranges = [gcp_compute_globaladdress.private_ip_alloc.name]
}
resource "gcp_compute_network" "default" {
  name = "alloydb-network"
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.alloydb.Cluster;
import com.pulumi.gcp.alloydb.ClusterArgs;
import com.pulumi.gcp.alloydb.inputs.ClusterNetworkConfigArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.alloydb.Instance;
import com.pulumi.gcp.alloydb.InstanceArgs;
import com.pulumi.gcp.alloydb.Backup;
import com.pulumi.gcp.alloydb.BackupArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.ArrayList;
import java.util.Arrays;
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 defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
            .name("alloydb-network")
            .build());

        var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
            .clusterId("alloydb-cluster")
            .location("us-central1")
            .networkConfig(ClusterNetworkConfigArgs.builder()
                .network(defaultNetwork.id())
                .build())
            .deletionProtection(false)
            .build());

        var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
            .name("alloydb-cluster")
            .addressType("INTERNAL")
            .purpose("VPC_PEERING")
            .prefixLength(16)
            .network(defaultNetwork.id())
            .build());

        var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
            .network(defaultNetwork.id())
            .service("servicenetworking.googleapis.com")
            .reservedPeeringRanges(privateIpAlloc.name())
            .build());

        var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
            .cluster(defaultCluster.name())
            .instanceId("alloydb-instance")
            .instanceType("PRIMARY")
            .build(), CustomResourceOptions.builder()
                .dependsOn(vpcConnection)
                .build());

        var default_ = new Backup("default", BackupArgs.builder()
            .location("us-central1")
            .backupId("alloydb-backup")
            .clusterName(defaultCluster.name())
            .description("example description")
            .type("ON_DEMAND")
            .labels(Map.of("label", "key"))
            .build(), CustomResourceOptions.builder()
                .dependsOn(defaultInstance)
                .build());

    }
}
resources:
  default:
    type: gcp:alloydb:Backup
    properties:
      location: us-central1
      backupId: alloydb-backup
      clusterName: ${defaultCluster.name}
      description: example description
      type: ON_DEMAND
      labels:
        label: key
    options:
      dependsOn:
        - ${defaultInstance}
  defaultCluster:
    type: gcp:alloydb:Cluster
    name: default
    properties:
      clusterId: alloydb-cluster
      location: us-central1
      networkConfig:
        network: ${defaultNetwork.id}
      deletionProtection: false
  defaultInstance:
    type: gcp:alloydb:Instance
    name: default
    properties:
      cluster: ${defaultCluster.name}
      instanceId: alloydb-instance
      instanceType: PRIMARY
    options:
      dependsOn:
        - ${vpcConnection}
  privateIpAlloc:
    type: gcp:compute:GlobalAddress
    name: private_ip_alloc
    properties:
      name: alloydb-cluster
      addressType: INTERNAL
      purpose: VPC_PEERING
      prefixLength: 16
      network: ${defaultNetwork.id}
  vpcConnection:
    type: gcp:servicenetworking:Connection
    name: vpc_connection
    properties:
      network: ${defaultNetwork.id}
      service: servicenetworking.googleapis.com
      reservedPeeringRanges:
        - ${privateIpAlloc.name}
  defaultNetwork:
    type: gcp:compute:Network
    name: default
    properties:
      name: alloydb-network

Import

Backup can be imported using any of these accepted formats:

  • projects/{{project}}/locations/{{location}}/backups/{{backup_id}}
  • {{project}}/{{location}}/{{backup_id}}
  • {{location}}/{{backup_id}}

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

$ pulumi import gcp:alloydb/backup:Backup default projects/{{project}}/locations/{{location}}/backups/{{backup_id}}
$ pulumi import gcp:alloydb/backup:Backup default {{project}}/{{location}}/{{backup_id}}
$ pulumi import gcp:alloydb/backup:Backup default {{location}}/{{backup_id}}

Constructors

Backup(String name, {BackupArgs? args, CustomResourceOptions? options})
Creates a new Backup. name The Pulumi resource name. args Arguments used to configure this Backup. The set of arguments for Backup. options Resource options controlling this resource's behavior.
Backup.reference(String urn)
Creates a typed reference to an existing Backup resource.

Properties

annotations ↔ Output<Map<String, String>?>
Annotations to allow client tools to store small amount of arbitrary data. This is distinct from labels. https://google.aip.dev/128 An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
latefinal
backupId ↔ Output<String>
The ID of the alloydb backup.
latefinal
childResources → Set<Resource>
finalinherited
clusterName ↔ Output<String>
The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
latefinal
clusterUid ↔ Output<String>
Output only. The system-generated UID of the cluster which was used to create this resource.
latefinal
completionSources ↔ Map<String, IOutputCompletionSource>
latefinalinherited
createTime ↔ Output<String>
Output only. Create time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
latefinal
deleteTime ↔ Output<String>
Output only. Delete time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
latefinal
deletionPolicy ↔ Output<String>
Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
latefinal
description ↔ Output<String?>
User-provided description of the backup.
latefinal
displayName ↔ Output<String?>
User-settable and human-readable display name for the Backup.
latefinal
effectiveAnnotations ↔ Output<Map<String, String>>
All of annotations (key/value pairs) present on the resource in GCP, including the annotations configured through Terraform, other clients and services.
latefinal
effectiveLabels ↔ Output<Map<String, String>>
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
latefinal
encryptionConfig ↔ Output<BackupEncryptionConfig?>
EncryptionConfig describes the encryption config of a cluster or a backup that is encrypted with a CMEK (customer-managed encryption key). Structure is documented below.
latefinal
encryptionInfos ↔ Output<List<BackupEncryptionInfo>>
EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
latefinal
etag ↔ Output<String>
For Resource freshness validation (https://google.aip.dev/154)
latefinal
expiryQuantities ↔ Output<List<BackupExpiryQuantity>>
Output only. The QuantityBasedExpiry of the backup, specified by the backup's retention policy. Once the expiry quantity is over retention, the backup is eligible to be garbage collected. Structure is documented below.
latefinal
expiryTime ↔ Output<String>
Output only. The time at which after the backup is eligible to be garbage collected. It is the duration specified by the backup's retention policy, added to the backup's createTime.
latefinal
hashCode → int
The hash code for this object.
no setterinherited
id ↔ Output<String>
getter/setter pairinherited
isCustom → bool
Returns whether this resource is provider-managed.
no setterinherited
isProtected → bool
Returns whether this resource is protected from deletion.
no setterinherited
isRemote → bool
Whether this resource is registered as remote.
no setterinherited
isResourceReference → bool
Whether this instance represents a resource value returned over RPC.
finalinherited
labels ↔ Output<Map<String, String>?>
User-defined labels for the alloydb backup. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
latefinal
location ↔ Output<String>
The location where the alloydb backup should reside.
latefinal
name ↔ Output<String>
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
latefinal
project ↔ Output<String>
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
latefinal
pulumiLabels ↔ Output<Map<String, String>>
The combination of labels configured directly on the resource and default labels configured on the provider.
latefinal
reconciling ↔ Output<bool>
Output only. Reconciling (https://google.aip.dev/128#reconciliation), if true, indicates that the service is actively updating the resource. This can happen due to user-triggered updates or system actions like failover or maintenance.
latefinal
resourceTransforms → List<ResourceTransform>
Inherited/explicit async transforms.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sizeBytes ↔ Output<String>
Output only. The size of the backup in bytes.
latefinal
state ↔ Output<String>
Output only. The current state of the backup.
latefinal
transformations → List<ResourceTransformation>
Inherited/explicit legacy transformations.
no setterinherited
type ↔ Output<String>
The backup type, which suggests the trigger for the backup. Possible values are: TYPE_UNSPECIFIED, ON_DEMAND, AUTOMATED, CONTINUOUS.
latefinal
uid ↔ Output<String>
Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.
latefinal
updateTime ↔ Output<String>
Output only. Update time stamp. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
latefinal
urn ↔ Output<String>
latefinalinherited

Methods

failId(Object error) → void
Completes this resource ID with an error when registration fails.
inherited
failOutputs(Object error) → void
Completes all output properties with error.
inherited
failUrn(Object error) → void
Completes this resource URN with an error when registration fails.
inherited
getProvider(String moduleMember) → ProviderResource?
Returns provider for moduleMember's package, if configured.
inherited
getResourceName() → String
Returns this resource's logical name.
inherited
getResourceType() → String
Returns this resource's Pulumi type token.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOutput<T>(String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output<T>
Registers a dynamic output property for this resource.
inherited
resolveId(String? value, {required bool isKnown}) → void
Resolves the provider-assigned ID for this resource.
inherited
resolveOutputs(Struct outputs) → void
Resolves all output properties from a monitor response payload.
inherited
resolveUrn(String value) → void
Resolves this resource's URN once assigned by the engine.
inherited
serializeProperties(Map<String, dynamic> properties) → Future<Struct>
Serializes resource properties for RPC transmission.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

get(String name, Input<String> id, {BackupState? state, CustomResourceOptions? options}) → Backup
Gets an existing Backup resource's state with the given name and id.