1. Packages
  2. AWS
  3. API Docs
  4. docdb
  5. GlobalCluster
AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi

aws.docdb.GlobalCluster

Explore with Pulumi AI

Manages an DocumentDB Global Cluster. A global cluster consists of one primary region and up to five read-only secondary regions. You issue write operations directly to the primary cluster in the primary region and Amazon DocumentDB automatically replicates the data to the secondary regions using dedicated infrastructure.

More information about DocumentDB Global Clusters can be found in the DocumentDB Developer Guide.

Example Usage

New DocumentDB Global Cluster

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

const example = new aws.docdb.GlobalCluster("example", {
    globalClusterIdentifier: "global-test",
    engine: "docdb",
    engineVersion: "4.0.0",
});
const primary = new aws.docdb.Cluster("primary", {
    engine: example.engine,
    engineVersion: example.engineVersion,
    clusterIdentifier: "test-primary-cluster",
    masterUsername: "username",
    masterPassword: "somepass123",
    globalClusterIdentifier: example.id,
    dbSubnetGroupName: "default",
});
const primaryClusterInstance = new aws.docdb.ClusterInstance("primary", {
    engine: example.engine,
    identifier: "test-primary-cluster-instance",
    clusterIdentifier: primary.id,
    instanceClass: "db.r5.large",
});
const secondary = new aws.docdb.Cluster("secondary", {
    engine: example.engine,
    engineVersion: example.engineVersion,
    clusterIdentifier: "test-secondary-cluster",
    globalClusterIdentifier: example.id,
    dbSubnetGroupName: "default",
}, {
    dependsOn: [primary],
});
const secondaryClusterInstance = new aws.docdb.ClusterInstance("secondary", {
    engine: example.engine,
    identifier: "test-secondary-cluster-instance",
    clusterIdentifier: secondary.id,
    instanceClass: "db.r5.large",
}, {
    dependsOn: [primaryClusterInstance],
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.docdb.GlobalCluster("example",
    global_cluster_identifier="global-test",
    engine="docdb",
    engine_version="4.0.0")
primary = aws.docdb.Cluster("primary",
    engine=example.engine,
    engine_version=example.engine_version,
    cluster_identifier="test-primary-cluster",
    master_username="username",
    master_password="somepass123",
    global_cluster_identifier=example.id,
    db_subnet_group_name="default")
primary_cluster_instance = aws.docdb.ClusterInstance("primary",
    engine=example.engine,
    identifier="test-primary-cluster-instance",
    cluster_identifier=primary.id,
    instance_class="db.r5.large")
secondary = aws.docdb.Cluster("secondary",
    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(depends_on=[primary]))
secondary_cluster_instance = aws.docdb.ClusterInstance("secondary",
    engine=example.engine,
    identifier="test-secondary-cluster-instance",
    cluster_identifier=secondary.id,
    instance_class="db.r5.large",
    opts = pulumi.ResourceOptions(depends_on=[primary_cluster_instance]))
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/docdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := docdb.NewGlobalCluster(ctx, "example", &docdb.GlobalClusterArgs{
			GlobalClusterIdentifier: pulumi.String("global-test"),
			Engine:                  pulumi.String("docdb"),
			EngineVersion:           pulumi.String("4.0.0"),
		})
		if err != nil {
			return err
		}
		primary, err := docdb.NewCluster(ctx, "primary", &docdb.ClusterArgs{
			Engine:                  example.Engine,
			EngineVersion:           example.EngineVersion,
			ClusterIdentifier:       pulumi.String("test-primary-cluster"),
			MasterUsername:          pulumi.String("username"),
			MasterPassword:          pulumi.String("somepass123"),
			GlobalClusterIdentifier: example.ID(),
			DbSubnetGroupName:       pulumi.String("default"),
		})
		if err != nil {
			return err
		}
		primaryClusterInstance, err := docdb.NewClusterInstance(ctx, "primary", &docdb.ClusterInstanceArgs{
			Engine:            example.Engine,
			Identifier:        pulumi.String("test-primary-cluster-instance"),
			ClusterIdentifier: primary.ID(),
			InstanceClass:     pulumi.String("db.r5.large"),
		})
		if err != nil {
			return err
		}
		secondary, err := docdb.NewCluster(ctx, "secondary", &docdb.ClusterArgs{
			Engine:                  example.Engine,
			EngineVersion:           example.EngineVersion,
			ClusterIdentifier:       pulumi.String("test-secondary-cluster"),
			GlobalClusterIdentifier: example.ID(),
			DbSubnetGroupName:       pulumi.String("default"),
		}, pulumi.DependsOn([]pulumi.Resource{
			primary,
		}))
		if err != nil {
			return err
		}
		_, err = docdb.NewClusterInstance(ctx, "secondary", &docdb.ClusterInstanceArgs{
			Engine:            example.Engine,
			Identifier:        pulumi.String("test-secondary-cluster-instance"),
			ClusterIdentifier: secondary.ID(),
			InstanceClass:     pulumi.String("db.r5.large"),
		}, pulumi.DependsOn([]pulumi.Resource{
			primaryClusterInstance,
		}))
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DocDB.GlobalCluster("example", new()
    {
        GlobalClusterIdentifier = "global-test",
        Engine = "docdb",
        EngineVersion = "4.0.0",
    });

    var primary = new Aws.DocDB.Cluster("primary", new()
    {
        Engine = example.Engine,
        EngineVersion = example.EngineVersion,
        ClusterIdentifier = "test-primary-cluster",
        MasterUsername = "username",
        MasterPassword = "somepass123",
        GlobalClusterIdentifier = example.Id,
        DbSubnetGroupName = "default",
    });

    var primaryClusterInstance = new Aws.DocDB.ClusterInstance("primary", new()
    {
        Engine = example.Engine,
        Identifier = "test-primary-cluster-instance",
        ClusterIdentifier = primary.Id,
        InstanceClass = "db.r5.large",
    });

    var secondary = new Aws.DocDB.Cluster("secondary", new()
    {
        Engine = example.Engine,
        EngineVersion = example.EngineVersion,
        ClusterIdentifier = "test-secondary-cluster",
        GlobalClusterIdentifier = example.Id,
        DbSubnetGroupName = "default",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            primary,
        },
    });

    var secondaryClusterInstance = new Aws.DocDB.ClusterInstance("secondary", new()
    {
        Engine = example.Engine,
        Identifier = "test-secondary-cluster-instance",
        ClusterIdentifier = secondary.Id,
        InstanceClass = "db.r5.large",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            primaryClusterInstance,
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.docdb.GlobalCluster;
import com.pulumi.aws.docdb.GlobalClusterArgs;
import com.pulumi.aws.docdb.Cluster;
import com.pulumi.aws.docdb.ClusterArgs;
import com.pulumi.aws.docdb.ClusterInstance;
import com.pulumi.aws.docdb.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("docdb")
            .engineVersion("4.0.0")
            .build());

        var primary = new Cluster("primary", ClusterArgs.builder()
            .engine(example.engine())
            .engineVersion(example.engineVersion())
            .clusterIdentifier("test-primary-cluster")
            .masterUsername("username")
            .masterPassword("somepass123")
            .globalClusterIdentifier(example.id())
            .dbSubnetGroupName("default")
            .build());

        var primaryClusterInstance = new ClusterInstance("primaryClusterInstance", ClusterInstanceArgs.builder()
            .engine(example.engine())
            .identifier("test-primary-cluster-instance")
            .clusterIdentifier(primary.id())
            .instanceClass("db.r5.large")
            .build());

        var secondary = new Cluster("secondary", ClusterArgs.builder()
            .engine(example.engine())
            .engineVersion(example.engineVersion())
            .clusterIdentifier("test-secondary-cluster")
            .globalClusterIdentifier(example.id())
            .dbSubnetGroupName("default")
            .build(), CustomResourceOptions.builder()
                .dependsOn(primary)
                .build());

        var secondaryClusterInstance = new ClusterInstance("secondaryClusterInstance", ClusterInstanceArgs.builder()
            .engine(example.engine())
            .identifier("test-secondary-cluster-instance")
            .clusterIdentifier(secondary.id())
            .instanceClass("db.r5.large")
            .build(), CustomResourceOptions.builder()
                .dependsOn(primaryClusterInstance)
                .build());

    }
}
Copy
resources:
  example:
    type: aws:docdb:GlobalCluster
    properties:
      globalClusterIdentifier: global-test
      engine: docdb
      engineVersion: 4.0.0
  primary:
    type: aws:docdb:Cluster
    properties:
      engine: ${example.engine}
      engineVersion: ${example.engineVersion}
      clusterIdentifier: test-primary-cluster
      masterUsername: username
      masterPassword: somepass123
      globalClusterIdentifier: ${example.id}
      dbSubnetGroupName: default
  primaryClusterInstance:
    type: aws:docdb:ClusterInstance
    name: primary
    properties:
      engine: ${example.engine}
      identifier: test-primary-cluster-instance
      clusterIdentifier: ${primary.id}
      instanceClass: db.r5.large
  secondary:
    type: aws:docdb:Cluster
    properties:
      engine: ${example.engine}
      engineVersion: ${example.engineVersion}
      clusterIdentifier: test-secondary-cluster
      globalClusterIdentifier: ${example.id}
      dbSubnetGroupName: default
    options:
      dependsOn:
        - ${primary}
  secondaryClusterInstance:
    type: aws:docdb:ClusterInstance
    name: secondary
    properties:
      engine: ${example.engine}
      identifier: test-secondary-cluster-instance
      clusterIdentifier: ${secondary.id}
      instanceClass: db.r5.large
    options:
      dependsOn:
        - ${primaryClusterInstance}
Copy

New Global Cluster From Existing DB Cluster

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

const example = new aws.docdb.Cluster("example", {});
const exampleGlobalCluster = new aws.docdb.GlobalCluster("example", {
    globalClusterIdentifier: "example",
    sourceDbClusterIdentifier: example.arn,
});
Copy
import pulumi
import pulumi_aws as aws

example = aws.docdb.Cluster("example")
example_global_cluster = aws.docdb.GlobalCluster("example",
    global_cluster_identifier="example",
    source_db_cluster_identifier=example.arn)
Copy
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/docdb"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := docdb.NewCluster(ctx, "example", nil)
		if err != nil {
			return err
		}
		_, err = docdb.NewGlobalCluster(ctx, "example", &docdb.GlobalClusterArgs{
			GlobalClusterIdentifier:   pulumi.String("example"),
			SourceDbClusterIdentifier: example.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;

return await Deployment.RunAsync(() => 
{
    var example = new Aws.DocDB.Cluster("example");

    var exampleGlobalCluster = new Aws.DocDB.GlobalCluster("example", new()
    {
        GlobalClusterIdentifier = "example",
        SourceDbClusterIdentifier = example.Arn,
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.docdb.Cluster;
import com.pulumi.aws.docdb.GlobalCluster;
import com.pulumi.aws.docdb.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 example = new Cluster("example");

        var exampleGlobalCluster = new GlobalCluster("exampleGlobalCluster", GlobalClusterArgs.builder()
            .globalClusterIdentifier("example")
            .sourceDbClusterIdentifier(example.arn())
            .build());

    }
}
Copy
resources:
  example:
    type: aws:docdb:Cluster
  exampleGlobalCluster:
    type: aws:docdb:GlobalCluster
    name: example
    properties:
      globalClusterIdentifier: example
      sourceDbClusterIdentifier: ${example.arn}
Copy

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,
                  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:docdb:GlobalCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. GlobalClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. GlobalClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. GlobalClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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 globalClusterResource = new Aws.DocDB.GlobalCluster("globalClusterResource", new()
{
    GlobalClusterIdentifier = "string",
    DatabaseName = "string",
    DeletionProtection = false,
    Engine = "string",
    EngineVersion = "string",
    SourceDbClusterIdentifier = "string",
    StorageEncrypted = false,
});
Copy
example, err := docdb.NewGlobalCluster(ctx, "globalClusterResource", &docdb.GlobalClusterArgs{
	GlobalClusterIdentifier:   pulumi.String("string"),
	DatabaseName:              pulumi.String("string"),
	DeletionProtection:        pulumi.Bool(false),
	Engine:                    pulumi.String("string"),
	EngineVersion:             pulumi.String("string"),
	SourceDbClusterIdentifier: pulumi.String("string"),
	StorageEncrypted:          pulumi.Bool(false),
})
Copy
var globalClusterResource = new GlobalCluster("globalClusterResource", GlobalClusterArgs.builder()
    .globalClusterIdentifier("string")
    .databaseName("string")
    .deletionProtection(false)
    .engine("string")
    .engineVersion("string")
    .sourceDbClusterIdentifier("string")
    .storageEncrypted(false)
    .build());
Copy
global_cluster_resource = aws.docdb.GlobalCluster("globalClusterResource",
    global_cluster_identifier="string",
    database_name="string",
    deletion_protection=False,
    engine="string",
    engine_version="string",
    source_db_cluster_identifier="string",
    storage_encrypted=False)
Copy
const globalClusterResource = new aws.docdb.GlobalCluster("globalClusterResource", {
    globalClusterIdentifier: "string",
    databaseName: "string",
    deletionProtection: false,
    engine: "string",
    engineVersion: "string",
    sourceDbClusterIdentifier: "string",
    storageEncrypted: false,
});
Copy
type: aws:docdb:GlobalCluster
properties:
    databaseName: string
    deletionProtection: false
    engine: string
    engineVersion: string
    globalClusterIdentifier: string
    sourceDbClusterIdentifier: string
    storageEncrypted: false
Copy

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:

GlobalClusterIdentifier
This property is required.
Changes to this property will trigger replacement.
string
The global cluster identifier.
DatabaseName Changes to this property will trigger replacement. string
Name for an automatically created database on cluster creation.
DeletionProtection 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 is false.
Engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
EngineVersion string
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
SourceDbClusterIdentifier Changes to this property will trigger replacement. string
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.
StorageEncrypted Changes to this property will trigger replacement. bool
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
GlobalClusterIdentifier
This property is required.
Changes to this property will trigger replacement.
string
The global cluster identifier.
DatabaseName Changes to this property will trigger replacement. string
Name for an automatically created database on cluster creation.
DeletionProtection 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 is false.
Engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
EngineVersion string
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
SourceDbClusterIdentifier Changes to this property will trigger replacement. string
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.
StorageEncrypted Changes to this property will trigger replacement. bool
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
globalClusterIdentifier
This property is required.
Changes to this property will trigger replacement.
String
The global cluster identifier.
databaseName Changes to this property will trigger replacement. String
Name for an automatically created database on cluster creation.
deletionProtection 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engineVersion String
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
sourceDbClusterIdentifier Changes to this property will trigger replacement. String
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.
storageEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
globalClusterIdentifier
This property is required.
Changes to this property will trigger replacement.
string
The global cluster identifier.
databaseName Changes to this property will trigger replacement. string
Name for an automatically created database on cluster creation.
deletionProtection 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engineVersion string
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
sourceDbClusterIdentifier Changes to this property will trigger replacement. string
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.
storageEncrypted Changes to this property will trigger replacement. boolean
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
global_cluster_identifier
This property is required.
Changes to this property will trigger replacement.
str
The global cluster identifier.
database_name Changes to this property will trigger replacement. 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engine_version str
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
source_db_cluster_identifier Changes to this property will trigger replacement. str
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 Changes to this property will trigger replacement. bool
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
globalClusterIdentifier
This property is required.
Changes to this property will trigger replacement.
String
The global cluster identifier.
databaseName Changes to this property will trigger replacement. String
Name for an automatically created database on cluster creation.
deletionProtection 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engineVersion String
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
sourceDbClusterIdentifier Changes to this property will trigger replacement. String
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.
storageEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is 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
Global Cluster Amazon Resource Name (ARN)
GlobalClusterMembers List<GlobalClusterGlobalClusterMember>
Set of objects containing Global Cluster members.
GlobalClusterResourceId string
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.
Status string
Arn string
Global Cluster Amazon Resource Name (ARN)
GlobalClusterMembers []GlobalClusterGlobalClusterMember
Set of objects containing Global Cluster members.
GlobalClusterResourceId string
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.
Status string
arn String
Global Cluster Amazon Resource Name (ARN)
globalClusterMembers List<GlobalClusterGlobalClusterMember>
Set of objects containing Global Cluster members.
globalClusterResourceId String
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.
status String
arn string
Global Cluster Amazon Resource Name (ARN)
globalClusterMembers GlobalClusterGlobalClusterMember[]
Set of objects containing Global Cluster members.
globalClusterResourceId string
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.
status string
arn str
Global Cluster Amazon Resource Name (ARN)
global_cluster_members Sequence[GlobalClusterGlobalClusterMember]
Set of objects containing Global Cluster members.
global_cluster_resource_id str
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.
status str
arn String
Global Cluster Amazon Resource Name (ARN)
globalClusterMembers List<Property Map>
Set of objects containing Global Cluster members.
globalClusterResourceId String
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.
status String

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,
        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,
        status: Optional[str] = None,
        storage_encrypted: Optional[bool] = None) -> GlobalCluster
func 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:docdb:GlobalCluster    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Arn string
Global Cluster Amazon Resource Name (ARN)
DatabaseName Changes to this property will trigger replacement. string
Name for an automatically created database on cluster creation.
DeletionProtection 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 is false.
Engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
EngineVersion string
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
GlobalClusterIdentifier Changes to this property will trigger replacement. string
The global cluster identifier.
GlobalClusterMembers List<GlobalClusterGlobalClusterMember>
Set of objects containing Global Cluster members.
GlobalClusterResourceId string
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.
SourceDbClusterIdentifier Changes to this property will trigger replacement. string
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.
Status string
StorageEncrypted Changes to this property will trigger replacement. bool
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
Arn string
Global Cluster Amazon Resource Name (ARN)
DatabaseName Changes to this property will trigger replacement. string
Name for an automatically created database on cluster creation.
DeletionProtection 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 is false.
Engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
EngineVersion string
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
GlobalClusterIdentifier Changes to this property will trigger replacement. string
The global cluster identifier.
GlobalClusterMembers []GlobalClusterGlobalClusterMemberArgs
Set of objects containing Global Cluster members.
GlobalClusterResourceId string
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.
SourceDbClusterIdentifier Changes to this property will trigger replacement. string
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.
Status string
StorageEncrypted Changes to this property will trigger replacement. bool
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
arn String
Global Cluster Amazon Resource Name (ARN)
databaseName Changes to this property will trigger replacement. String
Name for an automatically created database on cluster creation.
deletionProtection 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engineVersion String
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
globalClusterIdentifier Changes to this property will trigger replacement. String
The global cluster identifier.
globalClusterMembers List<GlobalClusterGlobalClusterMember>
Set of objects containing Global Cluster members.
globalClusterResourceId String
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.
sourceDbClusterIdentifier Changes to this property will trigger replacement. String
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.
status String
storageEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
arn string
Global Cluster Amazon Resource Name (ARN)
databaseName Changes to this property will trigger replacement. string
Name for an automatically created database on cluster creation.
deletionProtection 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engineVersion string
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
globalClusterIdentifier Changes to this property will trigger replacement. string
The global cluster identifier.
globalClusterMembers GlobalClusterGlobalClusterMember[]
Set of objects containing Global Cluster members.
globalClusterResourceId string
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.
sourceDbClusterIdentifier Changes to this property will trigger replacement. string
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.
status string
storageEncrypted Changes to this property will trigger replacement. boolean
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
arn str
Global Cluster Amazon Resource Name (ARN)
database_name Changes to this property will trigger replacement. 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engine_version str
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
global_cluster_identifier Changes to this property will trigger replacement. str
The global cluster identifier.
global_cluster_members Sequence[GlobalClusterGlobalClusterMemberArgs]
Set of objects containing Global Cluster members.
global_cluster_resource_id str
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_cluster_identifier Changes to this property will trigger replacement. str
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.
status str
storage_encrypted Changes to this property will trigger replacement. bool
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.
arn String
Global Cluster Amazon Resource Name (ARN)
databaseName Changes to this property will trigger replacement. String
Name for an automatically created database on cluster creation.
deletionProtection 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 is false.
engine Changes to this property will trigger replacement. 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. Current Valid values: docdb. Defaults to docdb. Conflicts with source_db_cluster_identifier.
engineVersion String
Engine version of the global database. Upgrading the engine version will result in all cluster members being immediately updated and will.

  • NOTE: Upgrading major versions is not supported.
globalClusterIdentifier Changes to this property will trigger replacement. String
The global cluster identifier.
globalClusterMembers List<Property Map>
Set of objects containing Global Cluster members.
globalClusterResourceId String
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.
sourceDbClusterIdentifier Changes to this property will trigger replacement. String
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.
status String
storageEncrypted Changes to this property will trigger replacement. Boolean
Specifies whether the DB cluster is encrypted. The default is false unless source_db_cluster_identifier is specified and encrypted. The provider will only perform drift detection if a configuration value is provided.

Supporting Types

GlobalClusterGlobalClusterMember
, GlobalClusterGlobalClusterMemberArgs

DbClusterArn string
Amazon Resource Name (ARN) of member DB Cluster.
IsWriter bool
Whether the member is the primary DB Cluster.
DbClusterArn string
Amazon Resource Name (ARN) of member DB Cluster.
IsWriter bool
Whether the member is the primary DB Cluster.
dbClusterArn String
Amazon Resource Name (ARN) of member DB Cluster.
isWriter Boolean
Whether the member is the primary DB Cluster.
dbClusterArn string
Amazon Resource Name (ARN) of member DB Cluster.
isWriter boolean
Whether the member is the primary DB Cluster.
db_cluster_arn str
Amazon Resource Name (ARN) of member DB Cluster.
is_writer bool
Whether the member is the primary DB Cluster.
dbClusterArn String
Amazon Resource Name (ARN) of member DB Cluster.
isWriter Boolean
Whether the member is the primary DB Cluster.

Import

Using pulumi import, import aws_docdb_global_cluster using the Global Cluster identifier. For example:

$ pulumi import aws:docdb/globalCluster:GlobalCluster example example
Copy

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 Pulumi program on an imported resource, Pulumi will always show a difference. To workaround this behavior, either omit the argument from the Pulumi program or use ignore_changes to hide the difference. For example:

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 aws Terraform Provider.