published on Tuesday, Mar 10, 2026 by Pulumi
published on Tuesday, Mar 10, 2026 by Pulumi
Manages an RDS Global Cluster, which is an Aurora global database spread across multiple regions. The global database contains a single primary cluster with read-write capability, and a read-only secondary cluster that receives data from the primary cluster through high-speed replication performed by the Aurora storage subsystem.
More information about Aurora global databases can be found in the Aurora User Guide.
Example Usage
New MySQL Global Cluster
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Rds.GlobalCluster("example", new()
{
GlobalClusterIdentifier = "global-test",
Engine = "aurora",
EngineVersion = "5.6.mysql_aurora.1.22.2",
DatabaseName = "example_db",
});
var primaryCluster = new Aws.Rds.Cluster("primaryCluster", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
ClusterIdentifier = "test-primary-cluster",
MasterUsername = "username",
MasterPassword = "somepass123",
DatabaseName = "example_db",
GlobalClusterIdentifier = example.Id,
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Primary,
});
var primaryClusterInstance = new Aws.Rds.ClusterInstance("primaryClusterInstance", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
Identifier = "test-primary-cluster-instance",
ClusterIdentifier = primaryCluster.Id,
InstanceClass = "db.r4.large",
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Primary,
});
var secondaryCluster = new Aws.Rds.Cluster("secondaryCluster", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
ClusterIdentifier = "test-secondary-cluster",
GlobalClusterIdentifier = example.Id,
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Secondary,
DependsOn = new[]
{
primaryClusterInstance,
},
});
var secondaryClusterInstance = new Aws.Rds.ClusterInstance("secondaryClusterInstance", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
Identifier = "test-secondary-cluster-instance",
ClusterIdentifier = secondaryCluster.Id,
InstanceClass = "db.r4.large",
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Secondary,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := rds.NewGlobalCluster(ctx, "example", &rds.GlobalClusterArgs{
GlobalClusterIdentifier: pulumi.String("global-test"),
Engine: pulumi.String("aurora"),
EngineVersion: pulumi.String("5.6.mysql_aurora.1.22.2"),
DatabaseName: pulumi.String("example_db"),
})
if err != nil {
return err
}
primaryCluster, err := rds.NewCluster(ctx, "primaryCluster", &rds.ClusterArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
ClusterIdentifier: pulumi.String("test-primary-cluster"),
MasterUsername: pulumi.String("username"),
MasterPassword: pulumi.String("somepass123"),
DatabaseName: pulumi.String("example_db"),
GlobalClusterIdentifier: example.ID(),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Primary))
if err != nil {
return err
}
primaryClusterInstance, err := rds.NewClusterInstance(ctx, "primaryClusterInstance", &rds.ClusterInstanceArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
Identifier: pulumi.String("test-primary-cluster-instance"),
ClusterIdentifier: primaryCluster.ID(),
InstanceClass: pulumi.String("db.r4.large"),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Primary))
if err != nil {
return err
}
secondaryCluster, err := rds.NewCluster(ctx, "secondaryCluster", &rds.ClusterArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
ClusterIdentifier: pulumi.String("test-secondary-cluster"),
GlobalClusterIdentifier: example.ID(),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Secondary), pulumi.DependsOn([]pulumi.Resource{
primaryClusterInstance,
}))
if err != nil {
return err
}
_, err = rds.NewClusterInstance(ctx, "secondaryClusterInstance", &rds.ClusterInstanceArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
Identifier: pulumi.String("test-secondary-cluster-instance"),
ClusterIdentifier: secondaryCluster.ID(),
InstanceClass: pulumi.String("db.r4.large"),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Secondary))
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.GlobalCluster;
import com.pulumi.aws.rds.GlobalClusterArgs;
import com.pulumi.aws.rds.Cluster;
import com.pulumi.aws.rds.ClusterArgs;
import com.pulumi.aws.rds.ClusterInstance;
import com.pulumi.aws.rds.ClusterInstanceArgs;
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) {
var example = new GlobalCluster("example", GlobalClusterArgs.builder()
.globalClusterIdentifier("global-test")
.engine("aurora")
.engineVersion("5.6.mysql_aurora.1.22.2")
.databaseName("example_db")
.build());
var primaryCluster = new Cluster("primaryCluster", ClusterArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.clusterIdentifier("test-primary-cluster")
.masterUsername("username")
.masterPassword("somepass123")
.databaseName("example_db")
.globalClusterIdentifier(example.id())
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.primary())
.build());
var primaryClusterInstance = new ClusterInstance("primaryClusterInstance", ClusterInstanceArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.identifier("test-primary-cluster-instance")
.clusterIdentifier(primaryCluster.id())
.instanceClass("db.r4.large")
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.primary())
.build());
var secondaryCluster = new Cluster("secondaryCluster", ClusterArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.clusterIdentifier("test-secondary-cluster")
.globalClusterIdentifier(example.id())
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.secondary())
.dependsOn(primaryClusterInstance)
.build());
var secondaryClusterInstance = new ClusterInstance("secondaryClusterInstance", ClusterInstanceArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.identifier("test-secondary-cluster-instance")
.clusterIdentifier(secondaryCluster.id())
.instanceClass("db.r4.large")
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.secondary())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rds.GlobalCluster("example", {
globalClusterIdentifier: "global-test",
engine: "aurora",
engineVersion: "5.6.mysql_aurora.1.22.2",
databaseName: "example_db",
});
const primaryCluster = new aws.rds.Cluster("primaryCluster", {
engine: example.engine,
engineVersion: example.engineVersion,
clusterIdentifier: "test-primary-cluster",
masterUsername: "username",
masterPassword: "somepass123",
databaseName: "example_db",
globalClusterIdentifier: example.id,
dbSubnetGroupName: "default",
}, {
provider: aws.primary,
});
const primaryClusterInstance = new aws.rds.ClusterInstance("primaryClusterInstance", {
engine: example.engine,
engineVersion: example.engineVersion,
identifier: "test-primary-cluster-instance",
clusterIdentifier: primaryCluster.id,
instanceClass: "db.r4.large",
dbSubnetGroupName: "default",
}, {
provider: aws.primary,
});
const secondaryCluster = new aws.rds.Cluster("secondaryCluster", {
engine: example.engine,
engineVersion: example.engineVersion,
clusterIdentifier: "test-secondary-cluster",
globalClusterIdentifier: example.id,
dbSubnetGroupName: "default",
}, {
provider: aws.secondary,
dependsOn: [primaryClusterInstance],
});
const secondaryClusterInstance = new aws.rds.ClusterInstance("secondaryClusterInstance", {
engine: example.engine,
engineVersion: example.engineVersion,
identifier: "test-secondary-cluster-instance",
clusterIdentifier: secondaryCluster.id,
instanceClass: "db.r4.large",
dbSubnetGroupName: "default",
}, {
provider: aws.secondary,
});
import pulumi
import pulumi_aws as aws
example = aws.rds.GlobalCluster("example",
global_cluster_identifier="global-test",
engine="aurora",
engine_version="5.6.mysql_aurora.1.22.2",
database_name="example_db")
primary_cluster = aws.rds.Cluster("primaryCluster",
engine=example.engine,
engine_version=example.engine_version,
cluster_identifier="test-primary-cluster",
master_username="username",
master_password="somepass123",
database_name="example_db",
global_cluster_identifier=example.id,
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["primary"]))
primary_cluster_instance = aws.rds.ClusterInstance("primaryClusterInstance",
engine=example.engine,
engine_version=example.engine_version,
identifier="test-primary-cluster-instance",
cluster_identifier=primary_cluster.id,
instance_class="db.r4.large",
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["primary"]))
secondary_cluster = aws.rds.Cluster("secondaryCluster",
engine=example.engine,
engine_version=example.engine_version,
cluster_identifier="test-secondary-cluster",
global_cluster_identifier=example.id,
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["secondary"],
depends_on=[primary_cluster_instance]))
secondary_cluster_instance = aws.rds.ClusterInstance("secondaryClusterInstance",
engine=example.engine,
engine_version=example.engine_version,
identifier="test-secondary-cluster-instance",
cluster_identifier=secondary_cluster.id,
instance_class="db.r4.large",
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["secondary"]))
resources:
example:
type: aws:rds:GlobalCluster
properties:
globalClusterIdentifier: global-test
engine: aurora
engineVersion: 5.6.mysql_aurora.1.22.2
databaseName: example_db
primaryCluster:
type: aws:rds:Cluster
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
clusterIdentifier: test-primary-cluster
masterUsername: username
masterPassword: somepass123
databaseName: example_db
globalClusterIdentifier: ${example.id}
dbSubnetGroupName: default
options:
provider: ${aws.primary}
primaryClusterInstance:
type: aws:rds:ClusterInstance
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
identifier: test-primary-cluster-instance
clusterIdentifier: ${primaryCluster.id}
instanceClass: db.r4.large
dbSubnetGroupName: default
options:
provider: ${aws.primary}
secondaryCluster:
type: aws:rds:Cluster
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
clusterIdentifier: test-secondary-cluster
globalClusterIdentifier: ${example.id}
dbSubnetGroupName: default
options:
provider: ${aws.secondary}
dependson:
- ${primaryClusterInstance}
secondaryClusterInstance:
type: aws:rds:ClusterInstance
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
identifier: test-secondary-cluster-instance
clusterIdentifier: ${secondaryCluster.id}
instanceClass: db.r4.large
dbSubnetGroupName: default
options:
provider: ${aws.secondary}
New PostgreSQL Global Cluster
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var primary = new Aws.Provider("primary", new()
{
Region = "us-east-2",
});
var secondary = new Aws.Provider("secondary", new()
{
Region = "us-east-1",
});
var example = new Aws.Rds.GlobalCluster("example", new()
{
GlobalClusterIdentifier = "global-test",
Engine = "aurora-postgresql",
EngineVersion = "11.9",
DatabaseName = "example_db",
});
var primaryCluster = new Aws.Rds.Cluster("primaryCluster", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
ClusterIdentifier = "test-primary-cluster",
MasterUsername = "username",
MasterPassword = "somepass123",
DatabaseName = "example_db",
GlobalClusterIdentifier = example.Id,
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Primary,
});
var primaryClusterInstance = new Aws.Rds.ClusterInstance("primaryClusterInstance", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
Identifier = "test-primary-cluster-instance",
ClusterIdentifier = primaryCluster.Id,
InstanceClass = "db.r4.large",
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Primary,
});
var secondaryCluster = new Aws.Rds.Cluster("secondaryCluster", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
ClusterIdentifier = "test-secondary-cluster",
GlobalClusterIdentifier = example.Id,
SkipFinalSnapshot = true,
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Secondary,
DependsOn = new[]
{
primaryClusterInstance,
},
});
var secondaryClusterInstance = new Aws.Rds.ClusterInstance("secondaryClusterInstance", new()
{
Engine = example.Engine,
EngineVersion = example.EngineVersion,
Identifier = "test-secondary-cluster-instance",
ClusterIdentifier = secondaryCluster.Id,
InstanceClass = "db.r4.large",
DbSubnetGroupName = "default",
}, new CustomResourceOptions
{
Provider = aws.Secondary,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := aws.NewProvider(ctx, "primary", &aws.ProviderArgs{
Region: pulumi.String("us-east-2"),
})
if err != nil {
return err
}
_, err = aws.NewProvider(ctx, "secondary", &aws.ProviderArgs{
Region: pulumi.String("us-east-1"),
})
if err != nil {
return err
}
example, err := rds.NewGlobalCluster(ctx, "example", &rds.GlobalClusterArgs{
GlobalClusterIdentifier: pulumi.String("global-test"),
Engine: pulumi.String("aurora-postgresql"),
EngineVersion: pulumi.String("11.9"),
DatabaseName: pulumi.String("example_db"),
})
if err != nil {
return err
}
primaryCluster, err := rds.NewCluster(ctx, "primaryCluster", &rds.ClusterArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
ClusterIdentifier: pulumi.String("test-primary-cluster"),
MasterUsername: pulumi.String("username"),
MasterPassword: pulumi.String("somepass123"),
DatabaseName: pulumi.String("example_db"),
GlobalClusterIdentifier: example.ID(),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Primary))
if err != nil {
return err
}
primaryClusterInstance, err := rds.NewClusterInstance(ctx, "primaryClusterInstance", &rds.ClusterInstanceArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
Identifier: pulumi.String("test-primary-cluster-instance"),
ClusterIdentifier: primaryCluster.ID(),
InstanceClass: pulumi.String("db.r4.large"),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Primary))
if err != nil {
return err
}
secondaryCluster, err := rds.NewCluster(ctx, "secondaryCluster", &rds.ClusterArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
ClusterIdentifier: pulumi.String("test-secondary-cluster"),
GlobalClusterIdentifier: example.ID(),
SkipFinalSnapshot: pulumi.Bool(true),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Secondary), pulumi.DependsOn([]pulumi.Resource{
primaryClusterInstance,
}))
if err != nil {
return err
}
_, err = rds.NewClusterInstance(ctx, "secondaryClusterInstance", &rds.ClusterInstanceArgs{
Engine: example.Engine,
EngineVersion: example.EngineVersion,
Identifier: pulumi.String("test-secondary-cluster-instance"),
ClusterIdentifier: secondaryCluster.ID(),
InstanceClass: pulumi.String("db.r4.large"),
DbSubnetGroupName: pulumi.String("default"),
}, pulumi.Provider(aws.Secondary))
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.Provider;
import com.pulumi.aws.ProviderArgs;
import com.pulumi.aws.rds.GlobalCluster;
import com.pulumi.aws.rds.GlobalClusterArgs;
import com.pulumi.aws.rds.Cluster;
import com.pulumi.aws.rds.ClusterArgs;
import com.pulumi.aws.rds.ClusterInstance;
import com.pulumi.aws.rds.ClusterInstanceArgs;
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) {
var primary = new Provider("primary", ProviderArgs.builder()
.region("us-east-2")
.build());
var secondary = new Provider("secondary", ProviderArgs.builder()
.region("us-east-1")
.build());
var example = new GlobalCluster("example", GlobalClusterArgs.builder()
.globalClusterIdentifier("global-test")
.engine("aurora-postgresql")
.engineVersion("11.9")
.databaseName("example_db")
.build());
var primaryCluster = new Cluster("primaryCluster", ClusterArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.clusterIdentifier("test-primary-cluster")
.masterUsername("username")
.masterPassword("somepass123")
.databaseName("example_db")
.globalClusterIdentifier(example.id())
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.primary())
.build());
var primaryClusterInstance = new ClusterInstance("primaryClusterInstance", ClusterInstanceArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.identifier("test-primary-cluster-instance")
.clusterIdentifier(primaryCluster.id())
.instanceClass("db.r4.large")
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.primary())
.build());
var secondaryCluster = new Cluster("secondaryCluster", ClusterArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.clusterIdentifier("test-secondary-cluster")
.globalClusterIdentifier(example.id())
.skipFinalSnapshot(true)
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.secondary())
.dependsOn(primaryClusterInstance)
.build());
var secondaryClusterInstance = new ClusterInstance("secondaryClusterInstance", ClusterInstanceArgs.builder()
.engine(example.engine())
.engineVersion(example.engineVersion())
.identifier("test-secondary-cluster-instance")
.clusterIdentifier(secondaryCluster.id())
.instanceClass("db.r4.large")
.dbSubnetGroupName("default")
.build(), CustomResourceOptions.builder()
.provider(aws.secondary())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const primary = new aws.Provider("primary", {region: "us-east-2"});
const secondary = new aws.Provider("secondary", {region: "us-east-1"});
const example = new aws.rds.GlobalCluster("example", {
globalClusterIdentifier: "global-test",
engine: "aurora-postgresql",
engineVersion: "11.9",
databaseName: "example_db",
});
const primaryCluster = new aws.rds.Cluster("primaryCluster", {
engine: example.engine,
engineVersion: example.engineVersion,
clusterIdentifier: "test-primary-cluster",
masterUsername: "username",
masterPassword: "somepass123",
databaseName: "example_db",
globalClusterIdentifier: example.id,
dbSubnetGroupName: "default",
}, {
provider: aws.primary,
});
const primaryClusterInstance = new aws.rds.ClusterInstance("primaryClusterInstance", {
engine: example.engine,
engineVersion: example.engineVersion,
identifier: "test-primary-cluster-instance",
clusterIdentifier: primaryCluster.id,
instanceClass: "db.r4.large",
dbSubnetGroupName: "default",
}, {
provider: aws.primary,
});
const secondaryCluster = new aws.rds.Cluster("secondaryCluster", {
engine: example.engine,
engineVersion: example.engineVersion,
clusterIdentifier: "test-secondary-cluster",
globalClusterIdentifier: example.id,
skipFinalSnapshot: true,
dbSubnetGroupName: "default",
}, {
provider: aws.secondary,
dependsOn: [primaryClusterInstance],
});
const secondaryClusterInstance = new aws.rds.ClusterInstance("secondaryClusterInstance", {
engine: example.engine,
engineVersion: example.engineVersion,
identifier: "test-secondary-cluster-instance",
clusterIdentifier: secondaryCluster.id,
instanceClass: "db.r4.large",
dbSubnetGroupName: "default",
}, {
provider: aws.secondary,
});
import pulumi
import pulumi_aws as aws
primary = aws.Provider("primary", region="us-east-2")
secondary = aws.Provider("secondary", region="us-east-1")
example = aws.rds.GlobalCluster("example",
global_cluster_identifier="global-test",
engine="aurora-postgresql",
engine_version="11.9",
database_name="example_db")
primary_cluster = aws.rds.Cluster("primaryCluster",
engine=example.engine,
engine_version=example.engine_version,
cluster_identifier="test-primary-cluster",
master_username="username",
master_password="somepass123",
database_name="example_db",
global_cluster_identifier=example.id,
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["primary"]))
primary_cluster_instance = aws.rds.ClusterInstance("primaryClusterInstance",
engine=example.engine,
engine_version=example.engine_version,
identifier="test-primary-cluster-instance",
cluster_identifier=primary_cluster.id,
instance_class="db.r4.large",
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["primary"]))
secondary_cluster = aws.rds.Cluster("secondaryCluster",
engine=example.engine,
engine_version=example.engine_version,
cluster_identifier="test-secondary-cluster",
global_cluster_identifier=example.id,
skip_final_snapshot=True,
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["secondary"],
depends_on=[primary_cluster_instance]))
secondary_cluster_instance = aws.rds.ClusterInstance("secondaryClusterInstance",
engine=example.engine,
engine_version=example.engine_version,
identifier="test-secondary-cluster-instance",
cluster_identifier=secondary_cluster.id,
instance_class="db.r4.large",
db_subnet_group_name="default",
opts=pulumi.ResourceOptions(provider=aws["secondary"]))
resources:
primary:
type: pulumi:providers:aws
properties:
region: us-east-2
secondary:
type: pulumi:providers:aws
properties:
region: us-east-1
example:
type: aws:rds:GlobalCluster
properties:
globalClusterIdentifier: global-test
engine: aurora-postgresql
engineVersion: '11.9'
databaseName: example_db
primaryCluster:
type: aws:rds:Cluster
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
clusterIdentifier: test-primary-cluster
masterUsername: username
masterPassword: somepass123
databaseName: example_db
globalClusterIdentifier: ${example.id}
dbSubnetGroupName: default
options:
provider: ${aws.primary}
primaryClusterInstance:
type: aws:rds:ClusterInstance
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
identifier: test-primary-cluster-instance
clusterIdentifier: ${primaryCluster.id}
instanceClass: db.r4.large
dbSubnetGroupName: default
options:
provider: ${aws.primary}
secondaryCluster:
type: aws:rds:Cluster
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
clusterIdentifier: test-secondary-cluster
globalClusterIdentifier: ${example.id}
skipFinalSnapshot: true
dbSubnetGroupName: default
options:
provider: ${aws.secondary}
dependson:
- ${primaryClusterInstance}
secondaryClusterInstance:
type: aws:rds:ClusterInstance
properties:
engine: ${example.engine}
engineVersion: ${example.engineVersion}
identifier: test-secondary-cluster-instance
clusterIdentifier: ${secondaryCluster.id}
instanceClass: db.r4.large
dbSubnetGroupName: default
options:
provider: ${aws.secondary}
New Global Cluster From Existing DB Cluster
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
// ... other configuration ...
var exampleCluster = new Aws.Rds.Cluster("exampleCluster");
var exampleGlobalCluster = new Aws.Rds.GlobalCluster("exampleGlobalCluster", new()
{
ForceDestroy = true,
GlobalClusterIdentifier = "example",
SourceDbClusterIdentifier = exampleCluster.Arn,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
exampleCluster, err := rds.NewCluster(ctx, "exampleCluster", nil)
if err != nil {
return err
}
_, err = rds.NewGlobalCluster(ctx, "exampleGlobalCluster", &rds.GlobalClusterArgs{
ForceDestroy: pulumi.Bool(true),
GlobalClusterIdentifier: pulumi.String("example"),
SourceDbClusterIdentifier: exampleCluster.Arn,
})
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.GlobalCluster;
import com.pulumi.aws.rds.GlobalClusterArgs;
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 exampleCluster = new Cluster("exampleCluster");
var exampleGlobalCluster = new GlobalCluster("exampleGlobalCluster", GlobalClusterArgs.builder()
.forceDestroy(true)
.globalClusterIdentifier("example")
.sourceDbClusterIdentifier(exampleCluster.arn())
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
// ... other configuration ...
const exampleCluster = new aws.rds.Cluster("exampleCluster", {});
const exampleGlobalCluster = new aws.rds.GlobalCluster("exampleGlobalCluster", {
forceDestroy: true,
globalClusterIdentifier: "example",
sourceDbClusterIdentifier: exampleCluster.arn,
});
import pulumi
import pulumi_aws as aws
# ... other configuration ...
example_cluster = aws.rds.Cluster("exampleCluster")
example_global_cluster = aws.rds.GlobalCluster("exampleGlobalCluster",
force_destroy=True,
global_cluster_identifier="example",
source_db_cluster_identifier=example_cluster.arn)
resources:
exampleCluster:
type: aws:rds:Cluster
exampleGlobalCluster:
type: aws:rds:GlobalCluster
properties:
forceDestroy: true
globalClusterIdentifier: example
sourceDbClusterIdentifier: ${exampleCluster.arn}
Upgrading Engine Versions
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Rds.GlobalCluster("example", new()
{
GlobalClusterIdentifier = "kyivkharkiv",
Engine = "aurora-mysql",
EngineVersion = "5.7.mysql_aurora.2.07.5",
});
var primaryCluster = new Aws.Rds.Cluster("primaryCluster", new()
{
AllowMajorVersionUpgrade = true,
ApplyImmediately = true,
ClusterIdentifier = "odessadnipro",
DatabaseName = "totoro",
Engine = example.Engine,
EngineVersion = example.EngineVersion,
GlobalClusterIdentifier = example.Id,
MasterPassword = "satsukimae",
MasterUsername = "maesatsuki",
SkipFinalSnapshot = true,
});
var primaryClusterInstance = new Aws.Rds.ClusterInstance("primaryClusterInstance", new()
{
ApplyImmediately = true,
ClusterIdentifier = primaryCluster.Id,
Engine = primaryCluster.Engine,
EngineVersion = primaryCluster.EngineVersion,
Identifier = "donetsklviv",
InstanceClass = "db.r4.large",
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := rds.NewGlobalCluster(ctx, "example", &rds.GlobalClusterArgs{
GlobalClusterIdentifier: pulumi.String("kyivkharkiv"),
Engine: pulumi.String("aurora-mysql"),
EngineVersion: pulumi.String("5.7.mysql_aurora.2.07.5"),
})
if err != nil {
return err
}
primaryCluster, err := rds.NewCluster(ctx, "primaryCluster", &rds.ClusterArgs{
AllowMajorVersionUpgrade: pulumi.Bool(true),
ApplyImmediately: pulumi.Bool(true),
ClusterIdentifier: pulumi.String("odessadnipro"),
DatabaseName: pulumi.String("totoro"),
Engine: example.Engine,
EngineVersion: example.EngineVersion,
GlobalClusterIdentifier: example.ID(),
MasterPassword: pulumi.String("satsukimae"),
MasterUsername: pulumi.String("maesatsuki"),
SkipFinalSnapshot: pulumi.Bool(true),
})
if err != nil {
return err
}
_, err = rds.NewClusterInstance(ctx, "primaryClusterInstance", &rds.ClusterInstanceArgs{
ApplyImmediately: pulumi.Bool(true),
ClusterIdentifier: primaryCluster.ID(),
Engine: primaryCluster.Engine,
EngineVersion: primaryCluster.EngineVersion,
Identifier: pulumi.String("donetsklviv"),
InstanceClass: pulumi.String("db.r4.large"),
})
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.GlobalCluster;
import com.pulumi.aws.rds.GlobalClusterArgs;
import com.pulumi.aws.rds.Cluster;
import com.pulumi.aws.rds.ClusterArgs;
import com.pulumi.aws.rds.ClusterInstance;
import com.pulumi.aws.rds.ClusterInstanceArgs;
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 GlobalCluster("example", GlobalClusterArgs.builder()
.globalClusterIdentifier("kyivkharkiv")
.engine("aurora-mysql")
.engineVersion("5.7.mysql_aurora.2.07.5")
.build());
var primaryCluster = new Cluster("primaryCluster", ClusterArgs.builder()
.allowMajorVersionUpgrade(true)
.applyImmediately(true)
.clusterIdentifier("odessadnipro")
.databaseName("totoro")
.engine(example.engine())
.engineVersion(example.engineVersion())
.globalClusterIdentifier(example.id())
.masterPassword("satsukimae")
.masterUsername("maesatsuki")
.skipFinalSnapshot(true)
.build());
var primaryClusterInstance = new ClusterInstance("primaryClusterInstance", ClusterInstanceArgs.builder()
.applyImmediately(true)
.clusterIdentifier(primaryCluster.id())
.engine(primaryCluster.engine())
.engineVersion(primaryCluster.engineVersion())
.identifier("donetsklviv")
.instanceClass("db.r4.large")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rds.GlobalCluster("example", {
globalClusterIdentifier: "kyivkharkiv",
engine: "aurora-mysql",
engineVersion: "5.7.mysql_aurora.2.07.5",
});
const primaryCluster = new aws.rds.Cluster("primaryCluster", {
allowMajorVersionUpgrade: true,
applyImmediately: true,
clusterIdentifier: "odessadnipro",
databaseName: "totoro",
engine: example.engine,
engineVersion: example.engineVersion,
globalClusterIdentifier: example.id,
masterPassword: "satsukimae",
masterUsername: "maesatsuki",
skipFinalSnapshot: true,
});
const primaryClusterInstance = new aws.rds.ClusterInstance("primaryClusterInstance", {
applyImmediately: true,
clusterIdentifier: primaryCluster.id,
engine: primaryCluster.engine,
engineVersion: primaryCluster.engineVersion,
identifier: "donetsklviv",
instanceClass: "db.r4.large",
});
import pulumi
import pulumi_aws as aws
example = aws.rds.GlobalCluster("example",
global_cluster_identifier="kyivkharkiv",
engine="aurora-mysql",
engine_version="5.7.mysql_aurora.2.07.5")
primary_cluster = aws.rds.Cluster("primaryCluster",
allow_major_version_upgrade=True,
apply_immediately=True,
cluster_identifier="odessadnipro",
database_name="totoro",
engine=example.engine,
engine_version=example.engine_version,
global_cluster_identifier=example.id,
master_password="satsukimae",
master_username="maesatsuki",
skip_final_snapshot=True)
primary_cluster_instance = aws.rds.ClusterInstance("primaryClusterInstance",
apply_immediately=True,
cluster_identifier=primary_cluster.id,
engine=primary_cluster.engine,
engine_version=primary_cluster.engine_version,
identifier="donetsklviv",
instance_class="db.r4.large")
resources:
example:
type: aws:rds:GlobalCluster
properties:
globalClusterIdentifier: kyivkharkiv
engine: aurora-mysql
engineVersion: 5.7.mysql_aurora.2.07.5
primaryCluster:
type: aws:rds:Cluster
properties:
allowMajorVersionUpgrade: true
applyImmediately: true
clusterIdentifier: odessadnipro
databaseName: totoro
engine: ${example.engine}
engineVersion: ${example.engineVersion}
globalClusterIdentifier: ${example.id}
masterPassword: satsukimae
masterUsername: maesatsuki
skipFinalSnapshot: true
primaryClusterInstance:
type: aws:rds:ClusterInstance
properties:
applyImmediately: true
clusterIdentifier: ${primaryCluster.id}
engine: ${primaryCluster.engine}
engineVersion: ${primaryCluster.engineVersion}
identifier: donetsklviv
instanceClass: db.r4.large
Create GlobalCluster Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new GlobalCluster(name: string, args: GlobalClusterArgs, opts?: CustomResourceOptions);@overload
def GlobalCluster(resource_name: str,
args: GlobalClusterArgs,
opts: Optional[ResourceOptions] = None)
@overload
def GlobalCluster(resource_name: str,
opts: Optional[ResourceOptions] = None,
global_cluster_identifier: Optional[str] = None,
database_name: Optional[str] = None,
deletion_protection: Optional[bool] = None,
engine: Optional[str] = None,
engine_version: Optional[str] = None,
force_destroy: Optional[bool] = None,
source_db_cluster_identifier: Optional[str] = None,
storage_encrypted: Optional[bool] = None)func NewGlobalCluster(ctx *Context, name string, args GlobalClusterArgs, opts ...ResourceOption) (*GlobalCluster, error)public GlobalCluster(string name, GlobalClusterArgs args, CustomResourceOptions? opts = null)
public GlobalCluster(String name, GlobalClusterArgs args)
public GlobalCluster(String name, GlobalClusterArgs args, CustomResourceOptions options)
type: aws:rds:GlobalCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args GlobalClusterArgs
- 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 GlobalClusterArgs
- 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 GlobalClusterArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args GlobalClusterArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args GlobalClusterArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var exampleglobalClusterResourceResourceFromRdsglobalCluster = new Aws.Rds.GlobalCluster("exampleglobalClusterResourceResourceFromRdsglobalCluster", new()
{
GlobalClusterIdentifier = "string",
DatabaseName = "string",
DeletionProtection = false,
Engine = "string",
EngineVersion = "string",
ForceDestroy = false,
SourceDbClusterIdentifier = "string",
StorageEncrypted = false,
});
example, err := rds.NewGlobalCluster(ctx, "exampleglobalClusterResourceResourceFromRdsglobalCluster", &rds.GlobalClusterArgs{
GlobalClusterIdentifier: pulumi.String("string"),
DatabaseName: pulumi.String("string"),
DeletionProtection: pulumi.Bool(false),
Engine: pulumi.String("string"),
EngineVersion: pulumi.String("string"),
ForceDestroy: pulumi.Bool(false),
SourceDbClusterIdentifier: pulumi.String("string"),
StorageEncrypted: pulumi.Bool(false),
})
var exampleglobalClusterResourceResourceFromRdsglobalCluster = new com.pulumi.aws.rds.GlobalCluster("exampleglobalClusterResourceResourceFromRdsglobalCluster", com.pulumi.aws.rds.GlobalClusterArgs.builder()
.globalClusterIdentifier("string")
.databaseName("string")
.deletionProtection(false)
.engine("string")
.engineVersion("string")
.forceDestroy(false)
.sourceDbClusterIdentifier("string")
.storageEncrypted(false)
.build());
exampleglobal_cluster_resource_resource_from_rdsglobal_cluster = aws.rds.GlobalCluster("exampleglobalClusterResourceResourceFromRdsglobalCluster",
global_cluster_identifier="string",
database_name="string",
deletion_protection=False,
engine="string",
engine_version="string",
force_destroy=False,
source_db_cluster_identifier="string",
storage_encrypted=False)
const exampleglobalClusterResourceResourceFromRdsglobalCluster = new aws.rds.GlobalCluster("exampleglobalClusterResourceResourceFromRdsglobalCluster", {
globalClusterIdentifier: "string",
databaseName: "string",
deletionProtection: false,
engine: "string",
engineVersion: "string",
forceDestroy: false,
sourceDbClusterIdentifier: "string",
storageEncrypted: false,
});
type: aws:rds:GlobalCluster
properties:
databaseName: string
deletionProtection: false
engine: string
engineVersion: string
forceDestroy: false
globalClusterIdentifier: string
sourceDbClusterIdentifier: string
storageEncrypted: false
GlobalCluster Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The GlobalCluster resource accepts the following input properties:
- Global
Cluster stringIdentifier - Global cluster identifier.
- Database
Name string - Name for an automatically created database on cluster creation.
- Deletion
Protection bool - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - Engine string
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - Engine
Version string - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - Force
Destroy bool - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - Source
Db stringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- Storage
Encrypted bool - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- Global
Cluster stringIdentifier - Global cluster identifier.
- Database
Name string - Name for an automatically created database on cluster creation.
- Deletion
Protection bool - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - Engine string
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - Engine
Version string - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - Force
Destroy bool - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - Source
Db stringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- Storage
Encrypted bool - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- global
Cluster StringIdentifier - Global cluster identifier.
- database
Name String - Name for an automatically created database on cluster creation.
- deletion
Protection Boolean - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine String
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine
Version String - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - force
Destroy Boolean - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - source
Db StringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage
Encrypted Boolean - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- global
Cluster stringIdentifier - Global cluster identifier.
- database
Name string - Name for an automatically created database on cluster creation.
- deletion
Protection boolean - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine string
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine
Version string - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - force
Destroy boolean - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - source
Db stringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage
Encrypted boolean - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- global_
cluster_ stridentifier - Global cluster identifier.
- database_
name str - Name for an automatically created database on cluster creation.
- deletion_
protection bool - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine str
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine_
version str - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - force_
destroy bool - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - source_
db_ strcluster_ identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage_
encrypted bool - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- global
Cluster StringIdentifier - Global cluster identifier.
- database
Name String - Name for an automatically created database on cluster creation.
- deletion
Protection Boolean - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine String
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine
Version String - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - force
Destroy Boolean - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - source
Db StringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage
Encrypted Boolean - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
Outputs
All input properties are implicitly available as output properties. Additionally, the GlobalCluster resource produces the following output properties:
- Arn string
- RDS Global Cluster Amazon Resource Name (ARN)
- Engine
Version stringActual - Global
Cluster List<GlobalMembers Cluster Global Cluster Member> - Set of objects containing Global Cluster members.
- Global
Cluster stringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- Id string
- The provider-assigned unique ID for this managed resource.
- Arn string
- RDS Global Cluster Amazon Resource Name (ARN)
- Engine
Version stringActual - Global
Cluster []GlobalMembers Cluster Global Cluster Member - Set of objects containing Global Cluster members.
- Global
Cluster stringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- Id string
- The provider-assigned unique ID for this managed resource.
- arn String
- RDS Global Cluster Amazon Resource Name (ARN)
- engine
Version StringActual - global
Cluster List<GlobalMembers Cluster Global Cluster Member> - Set of objects containing Global Cluster members.
- global
Cluster StringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- id String
- The provider-assigned unique ID for this managed resource.
- arn string
- RDS Global Cluster Amazon Resource Name (ARN)
- engine
Version stringActual - global
Cluster GlobalMembers Cluster Global Cluster Member[] - Set of objects containing Global Cluster members.
- global
Cluster stringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- id string
- The provider-assigned unique ID for this managed resource.
- arn str
- RDS Global Cluster Amazon Resource Name (ARN)
- engine_
version_ stractual - global_
cluster_ Sequence[Globalmembers Cluster Global Cluster Member] - Set of objects containing Global Cluster members.
- global_
cluster_ strresource_ id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- id str
- The provider-assigned unique ID for this managed resource.
- arn String
- RDS Global Cluster Amazon Resource Name (ARN)
- engine
Version StringActual - global
Cluster List<Property Map>Members - Set of objects containing Global Cluster members.
- global
Cluster StringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing GlobalCluster Resource
Get an existing GlobalCluster 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?: GlobalClusterState, opts?: CustomResourceOptions): GlobalCluster@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
arn: Optional[str] = None,
database_name: Optional[str] = None,
deletion_protection: Optional[bool] = None,
engine: Optional[str] = None,
engine_version: Optional[str] = None,
engine_version_actual: Optional[str] = None,
force_destroy: Optional[bool] = None,
global_cluster_identifier: Optional[str] = None,
global_cluster_members: Optional[Sequence[GlobalClusterGlobalClusterMemberArgs]] = None,
global_cluster_resource_id: Optional[str] = None,
source_db_cluster_identifier: Optional[str] = None,
storage_encrypted: Optional[bool] = None) -> GlobalClusterfunc GetGlobalCluster(ctx *Context, name string, id IDInput, state *GlobalClusterState, opts ...ResourceOption) (*GlobalCluster, error)public static GlobalCluster Get(string name, Input<string> id, GlobalClusterState? state, CustomResourceOptions? opts = null)public static GlobalCluster get(String name, Output<String> id, GlobalClusterState state, CustomResourceOptions options)resources: _: type: aws:rds:GlobalCluster get: id: ${id}- 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.
- Arn string
- RDS Global Cluster Amazon Resource Name (ARN)
- Database
Name string - Name for an automatically created database on cluster creation.
- Deletion
Protection bool - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - Engine string
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - Engine
Version string - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - Engine
Version stringActual - Force
Destroy bool - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - Global
Cluster stringIdentifier - Global cluster identifier.
- Global
Cluster List<GlobalMembers Cluster Global Cluster Member> - Set of objects containing Global Cluster members.
- Global
Cluster stringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- Source
Db stringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- Storage
Encrypted bool - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- Arn string
- RDS Global Cluster Amazon Resource Name (ARN)
- Database
Name string - Name for an automatically created database on cluster creation.
- Deletion
Protection bool - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - Engine string
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - Engine
Version string - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - Engine
Version stringActual - Force
Destroy bool - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - Global
Cluster stringIdentifier - Global cluster identifier.
- Global
Cluster []GlobalMembers Cluster Global Cluster Member Args - Set of objects containing Global Cluster members.
- Global
Cluster stringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- Source
Db stringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- Storage
Encrypted bool - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- arn String
- RDS Global Cluster Amazon Resource Name (ARN)
- database
Name String - Name for an automatically created database on cluster creation.
- deletion
Protection Boolean - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine String
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine
Version String - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - engine
Version StringActual - force
Destroy Boolean - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - global
Cluster StringIdentifier - Global cluster identifier.
- global
Cluster List<GlobalMembers Cluster Global Cluster Member> - Set of objects containing Global Cluster members.
- global
Cluster StringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- source
Db StringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage
Encrypted Boolean - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- arn string
- RDS Global Cluster Amazon Resource Name (ARN)
- database
Name string - Name for an automatically created database on cluster creation.
- deletion
Protection boolean - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine string
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine
Version string - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - engine
Version stringActual - force
Destroy boolean - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - global
Cluster stringIdentifier - Global cluster identifier.
- global
Cluster GlobalMembers Cluster Global Cluster Member[] - Set of objects containing Global Cluster members.
- global
Cluster stringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- source
Db stringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage
Encrypted boolean - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- arn str
- RDS Global Cluster Amazon Resource Name (ARN)
- database_
name str - Name for an automatically created database on cluster creation.
- deletion_
protection bool - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine str
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine_
version str - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - engine_
version_ stractual - force_
destroy bool - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - global_
cluster_ stridentifier - Global cluster identifier.
- global_
cluster_ Sequence[Globalmembers Cluster Global Cluster Member Args] - Set of objects containing Global Cluster members.
- global_
cluster_ strresource_ id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- source_
db_ strcluster_ identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage_
encrypted bool - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
- arn String
- RDS Global Cluster Amazon Resource Name (ARN)
- database
Name String - Name for an automatically created database on cluster creation.
- deletion
Protection Boolean - If the Global Cluster should have deletion protection enabled. The database can't be deleted when this value is set to
true. The default isfalse. - engine String
- Name of the database engine to be used for this DB cluster. The provider will only perform drift detection if a configuration value is provided. Valid values:
aurora,aurora-mysql,aurora-postgresql. Defaults toaurora. Conflicts withsource_db_cluster_identifier. - engine
Version String - Engine version of the Aurora global database. The
engine,engine_version, andinstance_class(on theaws.rds.ClusterInstance) must together support global databases. See Using Amazon Aurora global databases for more information. By upgrading the engine version, the provider will upgrade cluster members. NOTE: To avoid aninconsistent final planerror while upgrading, use thelifecycleignore_changesforengine_versionmeta argument on the associatedaws.rds.Clusterresource as shown above in Upgrading Engine Versions example. - engine
Version StringActual - force
Destroy Boolean - Enable to remove DB Cluster members from Global Cluster on destroy. Required with
source_db_cluster_identifier. - global
Cluster StringIdentifier - Global cluster identifier.
- global
Cluster List<Property Map>Members - Set of objects containing Global Cluster members.
- global
Cluster StringResource Id - AWS Region-unique, immutable identifier for the global database cluster. This identifier is found in AWS CloudTrail log entries whenever the AWS KMS key for the DB cluster is accessed
- source
Db StringCluster Identifier - Amazon Resource Name (ARN) to use as the primary DB Cluster of the Global Cluster on creation. The provider cannot perform drift detection of this value.
- storage
Encrypted Boolean - Specifies whether the DB cluster is encrypted. The default is
falseunlesssource_db_cluster_identifieris specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
Supporting Types
GlobalClusterGlobalClusterMember, GlobalClusterGlobalClusterMemberArgs
- Db
Cluster stringArn - Amazon Resource Name (ARN) of member DB Cluster
- Is
Writer bool - Whether the member is the primary DB Cluster
- Db
Cluster stringArn - Amazon Resource Name (ARN) of member DB Cluster
- Is
Writer bool - Whether the member is the primary DB Cluster
- db
Cluster StringArn - Amazon Resource Name (ARN) of member DB Cluster
- is
Writer Boolean - Whether the member is the primary DB Cluster
- db
Cluster stringArn - Amazon Resource Name (ARN) of member DB Cluster
- is
Writer boolean - Whether the member is the primary DB Cluster
- db_
cluster_ strarn - Amazon Resource Name (ARN) of member DB Cluster
- is_
writer bool - Whether the member is the primary DB Cluster
- db
Cluster StringArn - Amazon Resource Name (ARN) of member DB Cluster
- is
Writer Boolean - Whether the member is the primary DB Cluster
Import
aws_rds_global_cluster can be imported by using the RDS Global Cluster identifier, e.g.,
$ pulumi import aws:rds/globalCluster:GlobalCluster example example
Certain resource arguments, like force_destroy, only exist within this provider. If the argument is set in the the provider configuration on an imported resource, This provider will show a difference on the first plan after import to update the state value. This change is safe to apply immediately so the state matches the desired configuration. Certain resource arguments, like source_db_cluster_identifier, do not have an API method for reading the information after creation. If the argument is set in the provider configuration on an imported resource, the provider will always show a difference. To workaround this behavior, either omit the argument from the the provider configuration or use ignore_changes to hide the difference, e.g. terraform resource “aws_rds_global_cluster” “example” {
… other configuration …
There is no API for reading source_db_cluster_identifier
lifecycle {
ignore_changes = [source_db_cluster_identifier]
} }
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.
published on Tuesday, Mar 10, 2026 by Pulumi
