gcp.alloydb.Backup
Explore with Pulumi AI
An AlloyDB Backup.
To get more information about Backup, see:
- API documentation
- How-to Guides
Example Usage
Alloydb Backup Basic
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var defaultNetwork = Gcp.Compute.GetNetwork.Invoke(new()
{
Name = "alloydb-network",
});
var defaultCluster = new Gcp.Alloydb.Cluster("defaultCluster", new()
{
ClusterId = "alloydb-cluster",
Location = "us-central1",
Network = defaultNetwork.Apply(getNetworkResult => getNetworkResult.Id),
});
var privateIpAlloc = new Gcp.Compute.GlobalAddress("privateIpAlloc", new()
{
AddressType = "INTERNAL",
Purpose = "VPC_PEERING",
PrefixLength = 16,
Network = defaultNetwork.Apply(getNetworkResult => getNetworkResult.Id),
});
var vpcConnection = new Gcp.ServiceNetworking.Connection("vpcConnection", new()
{
Network = defaultNetwork.Apply(getNetworkResult => getNetworkResult.Id),
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
privateIpAlloc.Name,
},
});
var defaultInstance = new Gcp.Alloydb.Instance("defaultInstance", new()
{
Cluster = defaultCluster.Name,
InstanceId = "alloydb-instance",
InstanceType = "PRIMARY",
}, new CustomResourceOptions
{
DependsOn = new[]
{
vpcConnection,
},
});
var defaultBackup = new Gcp.Alloydb.Backup("defaultBackup", new()
{
Location = "us-central1",
BackupId = "alloydb-backup",
ClusterName = defaultCluster.Name,
}, new CustomResourceOptions
{
DependsOn = new[]
{
defaultInstance,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/alloydb"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultNetwork, err := compute.LookupNetwork(ctx, &compute.LookupNetworkArgs{
Name: "alloydb-network",
}, nil)
if err != nil {
return err
}
defaultCluster, err := alloydb.NewCluster(ctx, "defaultCluster", &alloydb.ClusterArgs{
ClusterId: pulumi.String("alloydb-cluster"),
Location: pulumi.String("us-central1"),
Network: *pulumi.String(defaultNetwork.Id),
})
if err != nil {
return err
}
privateIpAlloc, err := compute.NewGlobalAddress(ctx, "privateIpAlloc", &compute.GlobalAddressArgs{
AddressType: pulumi.String("INTERNAL"),
Purpose: pulumi.String("VPC_PEERING"),
PrefixLength: pulumi.Int(16),
Network: *pulumi.String(defaultNetwork.Id),
})
if err != nil {
return err
}
vpcConnection, err := servicenetworking.NewConnection(ctx, "vpcConnection", &servicenetworking.ConnectionArgs{
Network: *pulumi.String(defaultNetwork.Id),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
privateIpAlloc.Name,
},
})
if err != nil {
return err
}
defaultInstance, err := alloydb.NewInstance(ctx, "defaultInstance", &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, "defaultBackup", &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
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetNetworkArgs;
import com.pulumi.gcp.alloydb.Cluster;
import com.pulumi.gcp.alloydb.ClusterArgs;
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.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) {
final var defaultNetwork = ComputeFunctions.getNetwork(GetNetworkArgs.builder()
.name("alloydb-network")
.build());
var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.clusterId("alloydb-cluster")
.location("us-central1")
.network(defaultNetwork.applyValue(getNetworkResult -> getNetworkResult.id()))
.build());
var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
.addressType("INTERNAL")
.purpose("VPC_PEERING")
.prefixLength(16)
.network(defaultNetwork.applyValue(getNetworkResult -> getNetworkResult.id()))
.build());
var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
.network(defaultNetwork.applyValue(getNetworkResult -> getNetworkResult.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 defaultBackup = new Backup("defaultBackup", BackupArgs.builder()
.location("us-central1")
.backupId("alloydb-backup")
.clusterName(defaultCluster.name())
.build(), CustomResourceOptions.builder()
.dependsOn(defaultInstance)
.build());
}
}
import pulumi
import pulumi_gcp as gcp
default_network = gcp.compute.get_network(name="alloydb-network")
default_cluster = gcp.alloydb.Cluster("defaultCluster",
cluster_id="alloydb-cluster",
location="us-central1",
network=default_network.id)
private_ip_alloc = gcp.compute.GlobalAddress("privateIpAlloc",
address_type="INTERNAL",
purpose="VPC_PEERING",
prefix_length=16,
network=default_network.id)
vpc_connection = gcp.servicenetworking.Connection("vpcConnection",
network=default_network.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[private_ip_alloc.name])
default_instance = gcp.alloydb.Instance("defaultInstance",
cluster=default_cluster.name,
instance_id="alloydb-instance",
instance_type="PRIMARY",
opts=pulumi.ResourceOptions(depends_on=[vpc_connection]))
default_backup = gcp.alloydb.Backup("defaultBackup",
location="us-central1",
backup_id="alloydb-backup",
cluster_name=default_cluster.name,
opts=pulumi.ResourceOptions(depends_on=[default_instance]))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const defaultNetwork = gcp.compute.getNetwork({
name: "alloydb-network",
});
const defaultCluster = new gcp.alloydb.Cluster("defaultCluster", {
clusterId: "alloydb-cluster",
location: "us-central1",
network: defaultNetwork.then(defaultNetwork => defaultNetwork.id),
});
const privateIpAlloc = new gcp.compute.GlobalAddress("privateIpAlloc", {
addressType: "INTERNAL",
purpose: "VPC_PEERING",
prefixLength: 16,
network: defaultNetwork.then(defaultNetwork => defaultNetwork.id),
});
const vpcConnection = new gcp.servicenetworking.Connection("vpcConnection", {
network: defaultNetwork.then(defaultNetwork => defaultNetwork.id),
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [privateIpAlloc.name],
});
const defaultInstance = new gcp.alloydb.Instance("defaultInstance", {
cluster: defaultCluster.name,
instanceId: "alloydb-instance",
instanceType: "PRIMARY",
}, {
dependsOn: [vpcConnection],
});
const defaultBackup = new gcp.alloydb.Backup("defaultBackup", {
location: "us-central1",
backupId: "alloydb-backup",
clusterName: defaultCluster.name,
}, {
dependsOn: [defaultInstance],
});
resources:
defaultBackup:
type: gcp:alloydb:Backup
properties:
location: us-central1
backupId: alloydb-backup
clusterName: ${defaultCluster.name}
options:
dependson:
- ${defaultInstance}
defaultCluster:
type: gcp:alloydb:Cluster
properties:
clusterId: alloydb-cluster
location: us-central1
network: ${defaultNetwork.id}
defaultInstance:
type: gcp:alloydb:Instance
properties:
cluster: ${defaultCluster.name}
instanceId: alloydb-instance
instanceType: PRIMARY
options:
dependson:
- ${vpcConnection}
privateIpAlloc:
type: gcp:compute:GlobalAddress
properties:
addressType: INTERNAL
purpose: VPC_PEERING
prefixLength: 16
network: ${defaultNetwork.id}
vpcConnection:
type: gcp:servicenetworking:Connection
properties:
network: ${defaultNetwork.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${privateIpAlloc.name}
variables:
defaultNetwork:
fn::invoke:
Function: gcp:compute:getNetwork
Arguments:
name: alloydb-network
Alloydb Backup Full
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var defaultNetwork = Gcp.Compute.GetNetwork.Invoke(new()
{
Name = "alloydb-network",
});
var defaultCluster = new Gcp.Alloydb.Cluster("defaultCluster", new()
{
ClusterId = "alloydb-cluster",
Location = "us-central1",
Network = defaultNetwork.Apply(getNetworkResult => getNetworkResult.Id),
});
var privateIpAlloc = new Gcp.Compute.GlobalAddress("privateIpAlloc", new()
{
AddressType = "INTERNAL",
Purpose = "VPC_PEERING",
PrefixLength = 16,
Network = defaultNetwork.Apply(getNetworkResult => getNetworkResult.Id),
});
var vpcConnection = new Gcp.ServiceNetworking.Connection("vpcConnection", new()
{
Network = defaultNetwork.Apply(getNetworkResult => getNetworkResult.Id),
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
privateIpAlloc.Name,
},
});
var defaultInstance = new Gcp.Alloydb.Instance("defaultInstance", new()
{
Cluster = defaultCluster.Name,
InstanceId = "alloydb-instance",
InstanceType = "PRIMARY",
}, new CustomResourceOptions
{
DependsOn = new[]
{
vpcConnection,
},
});
var defaultBackup = new Gcp.Alloydb.Backup("defaultBackup", new()
{
Location = "us-central1",
BackupId = "alloydb-backup",
ClusterName = defaultCluster.Name,
Description = "example description",
Labels =
{
{ "label", "key" },
},
}, new CustomResourceOptions
{
DependsOn = new[]
{
defaultInstance,
},
});
});
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/alloydb"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v6/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
defaultNetwork, err := compute.LookupNetwork(ctx, &compute.LookupNetworkArgs{
Name: "alloydb-network",
}, nil)
if err != nil {
return err
}
defaultCluster, err := alloydb.NewCluster(ctx, "defaultCluster", &alloydb.ClusterArgs{
ClusterId: pulumi.String("alloydb-cluster"),
Location: pulumi.String("us-central1"),
Network: *pulumi.String(defaultNetwork.Id),
})
if err != nil {
return err
}
privateIpAlloc, err := compute.NewGlobalAddress(ctx, "privateIpAlloc", &compute.GlobalAddressArgs{
AddressType: pulumi.String("INTERNAL"),
Purpose: pulumi.String("VPC_PEERING"),
PrefixLength: pulumi.Int(16),
Network: *pulumi.String(defaultNetwork.Id),
})
if err != nil {
return err
}
vpcConnection, err := servicenetworking.NewConnection(ctx, "vpcConnection", &servicenetworking.ConnectionArgs{
Network: *pulumi.String(defaultNetwork.Id),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
privateIpAlloc.Name,
},
})
if err != nil {
return err
}
defaultInstance, err := alloydb.NewInstance(ctx, "defaultInstance", &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, "defaultBackup", &alloydb.BackupArgs{
Location: pulumi.String("us-central1"),
BackupId: pulumi.String("alloydb-backup"),
ClusterName: defaultCluster.Name,
Description: pulumi.String("example description"),
Labels: pulumi.StringMap{
"label": pulumi.String("key"),
},
}, pulumi.DependsOn([]pulumi.Resource{
defaultInstance,
}))
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.ComputeFunctions;
import com.pulumi.gcp.compute.inputs.GetNetworkArgs;
import com.pulumi.gcp.alloydb.Cluster;
import com.pulumi.gcp.alloydb.ClusterArgs;
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.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) {
final var defaultNetwork = ComputeFunctions.getNetwork(GetNetworkArgs.builder()
.name("alloydb-network")
.build());
var defaultCluster = new Cluster("defaultCluster", ClusterArgs.builder()
.clusterId("alloydb-cluster")
.location("us-central1")
.network(defaultNetwork.applyValue(getNetworkResult -> getNetworkResult.id()))
.build());
var privateIpAlloc = new GlobalAddress("privateIpAlloc", GlobalAddressArgs.builder()
.addressType("INTERNAL")
.purpose("VPC_PEERING")
.prefixLength(16)
.network(defaultNetwork.applyValue(getNetworkResult -> getNetworkResult.id()))
.build());
var vpcConnection = new Connection("vpcConnection", ConnectionArgs.builder()
.network(defaultNetwork.applyValue(getNetworkResult -> getNetworkResult.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 defaultBackup = new Backup("defaultBackup", BackupArgs.builder()
.location("us-central1")
.backupId("alloydb-backup")
.clusterName(defaultCluster.name())
.description("example description")
.labels(Map.of("label", "key"))
.build(), CustomResourceOptions.builder()
.dependsOn(defaultInstance)
.build());
}
}
import pulumi
import pulumi_gcp as gcp
default_network = gcp.compute.get_network(name="alloydb-network")
default_cluster = gcp.alloydb.Cluster("defaultCluster",
cluster_id="alloydb-cluster",
location="us-central1",
network=default_network.id)
private_ip_alloc = gcp.compute.GlobalAddress("privateIpAlloc",
address_type="INTERNAL",
purpose="VPC_PEERING",
prefix_length=16,
network=default_network.id)
vpc_connection = gcp.servicenetworking.Connection("vpcConnection",
network=default_network.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[private_ip_alloc.name])
default_instance = gcp.alloydb.Instance("defaultInstance",
cluster=default_cluster.name,
instance_id="alloydb-instance",
instance_type="PRIMARY",
opts=pulumi.ResourceOptions(depends_on=[vpc_connection]))
default_backup = gcp.alloydb.Backup("defaultBackup",
location="us-central1",
backup_id="alloydb-backup",
cluster_name=default_cluster.name,
description="example description",
labels={
"label": "key",
},
opts=pulumi.ResourceOptions(depends_on=[default_instance]))
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const defaultNetwork = gcp.compute.getNetwork({
name: "alloydb-network",
});
const defaultCluster = new gcp.alloydb.Cluster("defaultCluster", {
clusterId: "alloydb-cluster",
location: "us-central1",
network: defaultNetwork.then(defaultNetwork => defaultNetwork.id),
});
const privateIpAlloc = new gcp.compute.GlobalAddress("privateIpAlloc", {
addressType: "INTERNAL",
purpose: "VPC_PEERING",
prefixLength: 16,
network: defaultNetwork.then(defaultNetwork => defaultNetwork.id),
});
const vpcConnection = new gcp.servicenetworking.Connection("vpcConnection", {
network: defaultNetwork.then(defaultNetwork => defaultNetwork.id),
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [privateIpAlloc.name],
});
const defaultInstance = new gcp.alloydb.Instance("defaultInstance", {
cluster: defaultCluster.name,
instanceId: "alloydb-instance",
instanceType: "PRIMARY",
}, {
dependsOn: [vpcConnection],
});
const defaultBackup = new gcp.alloydb.Backup("defaultBackup", {
location: "us-central1",
backupId: "alloydb-backup",
clusterName: defaultCluster.name,
description: "example description",
labels: {
label: "key",
},
}, {
dependsOn: [defaultInstance],
});
resources:
defaultBackup:
type: gcp:alloydb:Backup
properties:
location: us-central1
backupId: alloydb-backup
clusterName: ${defaultCluster.name}
description: example description
labels:
label: key
options:
dependson:
- ${defaultInstance}
defaultCluster:
type: gcp:alloydb:Cluster
properties:
clusterId: alloydb-cluster
location: us-central1
network: ${defaultNetwork.id}
defaultInstance:
type: gcp:alloydb:Instance
properties:
cluster: ${defaultCluster.name}
instanceId: alloydb-instance
instanceType: PRIMARY
options:
dependson:
- ${vpcConnection}
privateIpAlloc:
type: gcp:compute:GlobalAddress
properties:
addressType: INTERNAL
purpose: VPC_PEERING
prefixLength: 16
network: ${defaultNetwork.id}
vpcConnection:
type: gcp:servicenetworking:Connection
properties:
network: ${defaultNetwork.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${privateIpAlloc.name}
variables:
defaultNetwork:
fn::invoke:
Function: gcp:compute:getNetwork
Arguments:
name: alloydb-network
Create Backup Resource
new Backup(name: string, args: BackupArgs, opts?: CustomResourceOptions);
@overload
def Backup(resource_name: str,
opts: Optional[ResourceOptions] = None,
backup_id: Optional[str] = None,
cluster_name: Optional[str] = None,
description: Optional[str] = None,
encryption_config: Optional[BackupEncryptionConfigArgs] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
project: Optional[str] = None)
@overload
def Backup(resource_name: str,
args: BackupArgs,
opts: Optional[ResourceOptions] = None)
func NewBackup(ctx *Context, name string, args BackupArgs, opts ...ResourceOption) (*Backup, error)
public Backup(string name, BackupArgs args, CustomResourceOptions? opts = null)
public Backup(String name, BackupArgs args)
public Backup(String name, BackupArgs args, CustomResourceOptions options)
type: gcp:alloydb:Backup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupArgs
- 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 BackupArgs
- 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 BackupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BackupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BackupArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Backup 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 Backup resource accepts the following input properties:
- Backup
Id string The ID of the alloydb backup.
- Cluster
Name string The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- Location string
The location where the alloydb backup should reside.
- Description string
User-provided description of the backup.
- Encryption
Config BackupEncryption Config 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.
- Labels Dictionary<string, string>
User-defined labels for the alloydb backup.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Backup
Id string The ID of the alloydb backup.
- Cluster
Name string The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- Location string
The location where the alloydb backup should reside.
- Description string
User-provided description of the backup.
- Encryption
Config BackupEncryption Config Args 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.
- Labels map[string]string
User-defined labels for the alloydb backup.
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- backup
Id String The ID of the alloydb backup.
- cluster
Name String The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- location String
The location where the alloydb backup should reside.
- description String
User-provided description of the backup.
- encryption
Config BackupEncryption Config 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.
- labels Map<String,String>
User-defined labels for the alloydb backup.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- backup
Id string The ID of the alloydb backup.
- cluster
Name string The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- location string
The location where the alloydb backup should reside.
- description string
User-provided description of the backup.
- encryption
Config BackupEncryption Config 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.
- labels {[key: string]: string}
User-defined labels for the alloydb backup.
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- backup_
id str The ID of the alloydb backup.
- cluster_
name str The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- location str
The location where the alloydb backup should reside.
- description str
User-provided description of the backup.
- encryption_
config BackupEncryption Config Args 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.
- labels Mapping[str, str]
User-defined labels for the alloydb backup.
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- backup
Id String The ID of the alloydb backup.
- cluster
Name String The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- location String
The location where the alloydb backup should reside.
- description String
User-provided description of the backup.
- encryption
Config Property Map 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.
- labels Map<String>
User-defined labels for the alloydb backup.
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the Backup resource produces the following output properties:
- Create
Time string Time the Backup was created in UTC.
- Encryption
Infos List<BackupEncryption Info> EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- Etag string
A hash of the resource.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- Reconciling bool
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.
- State string
The current state of the backup.
- Uid 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.
- Update
Time string Time the Backup was updated in UTC.
- Create
Time string Time the Backup was created in UTC.
- Encryption
Infos []BackupEncryption Info EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- Etag string
A hash of the resource.
- Id string
The provider-assigned unique ID for this managed resource.
- Name string
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- Reconciling bool
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.
- State string
The current state of the backup.
- Uid 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.
- Update
Time string Time the Backup was updated in UTC.
- create
Time String Time the Backup was created in UTC.
- encryption
Infos List<BackupEncryption Info> EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag String
A hash of the resource.
- id String
The provider-assigned unique ID for this managed resource.
- name String
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- reconciling Boolean
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.
- state String
The current state of the backup.
- uid 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.
- update
Time String Time the Backup was updated in UTC.
- create
Time string Time the Backup was created in UTC.
- encryption
Infos BackupEncryption Info[] EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag string
A hash of the resource.
- id string
The provider-assigned unique ID for this managed resource.
- name string
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- reconciling boolean
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.
- state string
The current state of the backup.
- uid 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.
- update
Time string Time the Backup was updated in UTC.
- create_
time str Time the Backup was created in UTC.
- encryption_
infos Sequence[BackupEncryption Info] EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag str
A hash of the resource.
- id str
The provider-assigned unique ID for this managed resource.
- name str
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- reconciling bool
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.
- state str
The current state of the backup.
- uid str
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.
- update_
time str Time the Backup was updated in UTC.
- create
Time String Time the Backup was created in UTC.
- encryption
Infos List<Property Map> EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag String
A hash of the resource.
- id String
The provider-assigned unique ID for this managed resource.
- name String
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- reconciling Boolean
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.
- state String
The current state of the backup.
- uid 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.
- update
Time String Time the Backup was updated in UTC.
Look up Existing Backup Resource
Get an existing Backup 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?: BackupState, opts?: CustomResourceOptions): Backup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backup_id: Optional[str] = None,
cluster_name: Optional[str] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
encryption_config: Optional[BackupEncryptionConfigArgs] = None,
encryption_infos: Optional[Sequence[BackupEncryptionInfoArgs]] = None,
etag: Optional[str] = None,
labels: Optional[Mapping[str, str]] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
reconciling: Optional[bool] = None,
state: Optional[str] = None,
uid: Optional[str] = None,
update_time: Optional[str] = None) -> Backup
func GetBackup(ctx *Context, name string, id IDInput, state *BackupState, opts ...ResourceOption) (*Backup, error)
public static Backup Get(string name, Input<string> id, BackupState? state, CustomResourceOptions? opts = null)
public static Backup get(String name, Output<String> id, BackupState 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.
- Backup
Id string The ID of the alloydb backup.
- Cluster
Name string The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- Create
Time string Time the Backup was created in UTC.
- Description string
User-provided description of the backup.
- Encryption
Config BackupEncryption Config 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.
- Encryption
Infos List<BackupEncryption Info> EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- Etag string
A hash of the resource.
- Labels Dictionary<string, string>
User-defined labels for the alloydb backup.
- Location string
The location where the alloydb backup should reside.
- Name string
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Reconciling bool
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.
- State string
The current state of the backup.
- Uid 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.
- Update
Time string Time the Backup was updated in UTC.
- Backup
Id string The ID of the alloydb backup.
- Cluster
Name string The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- Create
Time string Time the Backup was created in UTC.
- Description string
User-provided description of the backup.
- Encryption
Config BackupEncryption Config Args 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.
- Encryption
Infos []BackupEncryption Info Args EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- Etag string
A hash of the resource.
- Labels map[string]string
User-defined labels for the alloydb backup.
- Location string
The location where the alloydb backup should reside.
- Name string
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- Project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Reconciling bool
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.
- State string
The current state of the backup.
- Uid 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.
- Update
Time string Time the Backup was updated in UTC.
- backup
Id String The ID of the alloydb backup.
- cluster
Name String The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- create
Time String Time the Backup was created in UTC.
- description String
User-provided description of the backup.
- encryption
Config BackupEncryption Config 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.
- encryption
Infos List<BackupEncryption Info> EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag String
A hash of the resource.
- labels Map<String,String>
User-defined labels for the alloydb backup.
- location String
The location where the alloydb backup should reside.
- name String
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reconciling Boolean
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.
- state String
The current state of the backup.
- uid 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.
- update
Time String Time the Backup was updated in UTC.
- backup
Id string The ID of the alloydb backup.
- cluster
Name string The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- create
Time string Time the Backup was created in UTC.
- description string
User-provided description of the backup.
- encryption
Config BackupEncryption Config 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.
- encryption
Infos BackupEncryption Info[] EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag string
A hash of the resource.
- labels {[key: string]: string}
User-defined labels for the alloydb backup.
- location string
The location where the alloydb backup should reside.
- name string
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- project string
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reconciling boolean
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.
- state string
The current state of the backup.
- uid 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.
- update
Time string Time the Backup was updated in UTC.
- backup_
id str The ID of the alloydb backup.
- cluster_
name str The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- create_
time str Time the Backup was created in UTC.
- description str
User-provided description of the backup.
- encryption_
config BackupEncryption Config Args 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.
- encryption_
infos Sequence[BackupEncryption Info Args] EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag str
A hash of the resource.
- labels Mapping[str, str]
User-defined labels for the alloydb backup.
- location str
The location where the alloydb backup should reside.
- name str
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- project str
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reconciling bool
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.
- state str
The current state of the backup.
- uid str
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.
- update_
time str Time the Backup was updated in UTC.
- backup
Id String The ID of the alloydb backup.
- cluster
Name String The full resource name of the backup source cluster (e.g., projects/{project}/locations/{location}/clusters/{clusterId}).
- create
Time String Time the Backup was created in UTC.
- description String
User-provided description of the backup.
- encryption
Config Property Map 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.
- encryption
Infos List<Property Map> EncryptionInfo describes the encryption information of a cluster or a backup. Structure is documented below.
- etag String
A hash of the resource.
- labels Map<String>
User-defined labels for the alloydb backup.
- location String
The location where the alloydb backup should reside.
- name String
Output only. The name of the backup resource with the format: * projects/{project}/locations/{region}/backups/{backupId}
- project String
The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- reconciling Boolean
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.
- state String
The current state of the backup.
- uid 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.
- update
Time String Time the Backup was updated in UTC.
Supporting Types
BackupEncryptionConfig, BackupEncryptionConfigArgs
- Kms
Key stringName The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME].
- Kms
Key stringName The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME].
- kms
Key StringName The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME].
- kms
Key stringName The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME].
- kms_
key_ strname The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME].
- kms
Key StringName The fully-qualified resource name of the KMS key. Each Cloud KMS key is regionalized and has the following format: projects/[PROJECT]/locations/[REGION]/keyRings/[RING]/cryptoKeys/[KEY_NAME].
BackupEncryptionInfo, BackupEncryptionInfoArgs
- Encryption
Type string (Output) Output only. Type of encryption.
- Kms
Key List<string>Versions (Output) Output only. Cloud KMS key versions that are being used to protect the database or the backup.
- Encryption
Type string (Output) Output only. Type of encryption.
- Kms
Key []stringVersions (Output) Output only. Cloud KMS key versions that are being used to protect the database or the backup.
- encryption
Type String (Output) Output only. Type of encryption.
- kms
Key List<String>Versions (Output) Output only. Cloud KMS key versions that are being used to protect the database or the backup.
- encryption
Type string (Output) Output only. Type of encryption.
- kms
Key string[]Versions (Output) Output only. Cloud KMS key versions that are being used to protect the database or the backup.
- encryption_
type str (Output) Output only. Type of encryption.
- kms_
key_ Sequence[str]versions (Output) Output only. Cloud KMS key versions that are being used to protect the database or the backup.
- encryption
Type String (Output) Output only. Type of encryption.
- kms
Key List<String>Versions (Output) Output only. Cloud KMS key versions that are being used to protect the database or the backup.
Import
Backup can be imported using any of these accepted formats
$ 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}}
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
google-beta
Terraform Provider.