ClusterSnapshotCopy

class ClusterSnapshotCopy : KotlinCustomResource

Manages an RDS database cluster snapshot copy. For managing RDS database instance snapshot copies, see the aws.rds.SnapshotCopy resource.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rds.Cluster("example", {
clusterIdentifier: "aurora-cluster-demo",
databaseName: "test",
engine: aws.rds.EngineType.AuroraMysql,
masterUsername: "tfacctest",
masterPassword: "avoid-plaintext-passwords",
skipFinalSnapshot: true,
});
const exampleClusterSnapshot = new aws.rds.ClusterSnapshot("example", {
dbClusterIdentifier: example.clusterIdentifier,
dbClusterSnapshotIdentifier: "example",
});
const exampleClusterSnapshotCopy = new aws.rds.ClusterSnapshotCopy("example", {
sourceDbClusterSnapshotIdentifier: exampleClusterSnapshot.dbClusterSnapshotArn,
targetDbClusterSnapshotIdentifier: "example-copy",
});
import pulumi
import pulumi_aws as aws
example = aws.rds.Cluster("example",
cluster_identifier="aurora-cluster-demo",
database_name="test",
engine=aws.rds.EngineType.AURORA_MYSQL,
master_username="tfacctest",
master_password="avoid-plaintext-passwords",
skip_final_snapshot=True)
example_cluster_snapshot = aws.rds.ClusterSnapshot("example",
db_cluster_identifier=example.cluster_identifier,
db_cluster_snapshot_identifier="example")
example_cluster_snapshot_copy = aws.rds.ClusterSnapshotCopy("example",
source_db_cluster_snapshot_identifier=example_cluster_snapshot.db_cluster_snapshot_arn,
target_db_cluster_snapshot_identifier="example-copy")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Rds.Cluster("example", new()
{
ClusterIdentifier = "aurora-cluster-demo",
DatabaseName = "test",
Engine = Aws.Rds.EngineType.AuroraMysql,
MasterUsername = "tfacctest",
MasterPassword = "avoid-plaintext-passwords",
SkipFinalSnapshot = true,
});
var exampleClusterSnapshot = new Aws.Rds.ClusterSnapshot("example", new()
{
DbClusterIdentifier = example.ClusterIdentifier,
DbClusterSnapshotIdentifier = "example",
});
var exampleClusterSnapshotCopy = new Aws.Rds.ClusterSnapshotCopy("example", new()
{
SourceDbClusterSnapshotIdentifier = exampleClusterSnapshot.DbClusterSnapshotArn,
TargetDbClusterSnapshotIdentifier = "example-copy",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := rds.NewCluster(ctx, "example", &rds.ClusterArgs{
ClusterIdentifier: pulumi.String("aurora-cluster-demo"),
DatabaseName: pulumi.String("test"),
Engine: pulumi.String(rds.EngineTypeAuroraMysql),
MasterUsername: pulumi.String("tfacctest"),
MasterPassword: pulumi.String("avoid-plaintext-passwords"),
SkipFinalSnapshot: pulumi.Bool(true),
})
if err != nil {
return err
}
exampleClusterSnapshot, err := rds.NewClusterSnapshot(ctx, "example", &rds.ClusterSnapshotArgs{
DbClusterIdentifier: example.ClusterIdentifier,
DbClusterSnapshotIdentifier: pulumi.String("example"),
})
if err != nil {
return err
}
_, err = rds.NewClusterSnapshotCopy(ctx, "example", &rds.ClusterSnapshotCopyArgs{
SourceDbClusterSnapshotIdentifier: exampleClusterSnapshot.DbClusterSnapshotArn,
TargetDbClusterSnapshotIdentifier: pulumi.String("example-copy"),
})
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.aws.rds.Cluster;
import com.pulumi.aws.rds.ClusterArgs;
import com.pulumi.aws.rds.ClusterSnapshot;
import com.pulumi.aws.rds.ClusterSnapshotArgs;
import com.pulumi.aws.rds.ClusterSnapshotCopy;
import com.pulumi.aws.rds.ClusterSnapshotCopyArgs;
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 example = new Cluster("example", ClusterArgs.builder()
.clusterIdentifier("aurora-cluster-demo")
.databaseName("test")
.engine("aurora-mysql")
.masterUsername("tfacctest")
.masterPassword("avoid-plaintext-passwords")
.skipFinalSnapshot(true)
.build());
var exampleClusterSnapshot = new ClusterSnapshot("exampleClusterSnapshot", ClusterSnapshotArgs.builder()
.dbClusterIdentifier(example.clusterIdentifier())
.dbClusterSnapshotIdentifier("example")
.build());
var exampleClusterSnapshotCopy = new ClusterSnapshotCopy("exampleClusterSnapshotCopy", ClusterSnapshotCopyArgs.builder()
.sourceDbClusterSnapshotIdentifier(exampleClusterSnapshot.dbClusterSnapshotArn())
.targetDbClusterSnapshotIdentifier("example-copy")
.build());
}
}
resources:
example:
type: aws:rds:Cluster
properties:
clusterIdentifier: aurora-cluster-demo
databaseName: test
engine: aurora-mysql
masterUsername: tfacctest
masterPassword: avoid-plaintext-passwords
skipFinalSnapshot: true
exampleClusterSnapshot:
type: aws:rds:ClusterSnapshot
name: example
properties:
dbClusterIdentifier: ${example.clusterIdentifier}
dbClusterSnapshotIdentifier: example
exampleClusterSnapshotCopy:
type: aws:rds:ClusterSnapshotCopy
name: example
properties:
sourceDbClusterSnapshotIdentifier: ${exampleClusterSnapshot.dbClusterSnapshotArn}
targetDbClusterSnapshotIdentifier: example-copy

Import

Using pulumi import, import aws_rds_cluster_snapshot_copy using the id. For example:

$ pulumi import aws:rds/clusterSnapshotCopy:ClusterSnapshotCopy example my-snapshot

Properties

Link copied to clipboard
val allocatedStorage: Output<Int>

Specifies the allocated storage size in gigabytes (GB).

Link copied to clipboard
val copyTags: Output<Boolean>?

Whether to copy existing tags. Defaults to false.

Link copied to clipboard

The Amazon Resource Name (ARN) for the DB cluster snapshot.

Link copied to clipboard

The Destination region to place snapshot copy.

Link copied to clipboard
val engine: Output<String>

Specifies the name of the database engine.

Link copied to clipboard
val engineVersion: Output<String>

Specifies the version of the database engine.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val kmsKeyId: Output<String>?

KMS key ID.

Link copied to clipboard
val licenseModel: Output<String>

License model information for the restored DB instance.

Link copied to clipboard
val presignedUrl: Output<String>?

URL that contains a Signature Version 4 signed request.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val sharedAccounts: Output<List<String>>?

List of AWS Account IDs to share the snapshot with. Use all to make the snapshot public.

Link copied to clipboard
val snapshotType: Output<String>
Link copied to clipboard

Identifier of the source snapshot.

Link copied to clipboard

Specifies whether the DB cluster snapshot is encrypted.

Link copied to clipboard
val storageType: Output<String>

Specifies the storage type associated with DB cluster snapshot.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

A map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard

Identifier for the snapshot. The following arguments are optional:

Link copied to clipboard
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

Provides the VPC ID associated with the DB cluster snapshot.