Cluster class
Manages a DocumentDB Cluster.
Changes to a DocumentDB Cluster can occur when you manually change a
parameter, such as port, and are reflected in the next maintenance
window. Because of this, this provider may report a difference in its planning
phase because a modification has not yet taken place. You can use the
applyImmediately flag to instruct the service to apply the change immediately
(see documentation below).
> Note: using applyImmediately can result in a brief downtime as the server reboots.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const docdb = new aws.docdb.Cluster("docdb", {
clusterIdentifier: "my-docdb-cluster",
engine: "docdb",
masterUsername: "foo",
masterPassword: "mustbeeightchars",
backupRetentionPeriod: 5,
preferredBackupWindow: "07:00-09:00",
skipFinalSnapshot: true,
});
import pulumi
import pulumi_aws as aws
docdb = aws.docdb.Cluster("docdb",
cluster_identifier="my-docdb-cluster",
engine="docdb",
master_username="foo",
master_password="mustbeeightchars",
backup_retention_period=5,
preferred_backup_window="07:00-09:00",
skip_final_snapshot=True)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var docdb = new Aws.DocDB.Cluster("docdb", new()
{
ClusterIdentifier = "my-docdb-cluster",
Engine = "docdb",
MasterUsername = "foo",
MasterPassword = "mustbeeightchars",
BackupRetentionPeriod = 5,
PreferredBackupWindow = "07:00-09:00",
SkipFinalSnapshot = true,
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v7/go/aws/docdb"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := docdb.NewCluster(ctx, "docdb", &docdb.ClusterArgs{
ClusterIdentifier: pulumi.String("my-docdb-cluster"),
Engine: pulumi.String("docdb"),
MasterUsername: pulumi.String("foo"),
MasterPassword: pulumi.String("mustbeeightchars"),
BackupRetentionPeriod: pulumi.Int(5),
PreferredBackupWindow: pulumi.String("07:00-09:00"),
SkipFinalSnapshot: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
aws = {
source = "pulumi/aws"
}
}
}
resource "aws_docdb_cluster" "docdb" {
cluster_identifier = "my-docdb-cluster"
engine = "docdb"
master_username = "foo"
master_password = "mustbeeightchars"
backup_retention_period = 5
preferred_backup_window = "07:00-09:00"
skip_final_snapshot = true
}
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.ClusterArgs;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var docdb = new Cluster("docdb", ClusterArgs.builder()
.clusterIdentifier("my-docdb-cluster")
.engine("docdb")
.masterUsername("foo")
.masterPassword("mustbeeightchars")
.backupRetentionPeriod(5)
.preferredBackupWindow("07:00-09:00")
.skipFinalSnapshot(true)
.build());
}
}
resources:
docdb:
type: aws:docdb:Cluster
properties:
clusterIdentifier: my-docdb-cluster
engine: docdb
masterUsername: foo
masterPassword: mustbeeightchars
backupRetentionPeriod: 5
preferredBackupWindow: 07:00-09:00
skipFinalSnapshot: true
Import
Using pulumi import, import DocumentDB Clusters using the clusterIdentifier. For example:
$ pulumi import aws:docdb/cluster:Cluster docdb_cluster docdb-prod-cluster
Constructors
- Cluster(String name, {ClusterArgs? args, CustomResourceOptions? options})
-
Creates a new Cluster.
nameThe Pulumi resource name.argsArguments used to configure this Cluster. The set of arguments for Cluster.optionsResource options controlling this resource's behavior. - Cluster.reference(String urn)
- Creates a typed reference to an existing Cluster resource.
Properties
-
allowMajorVersionUpgrade
↔ Output<
bool?> -
A value that indicates whether major version upgrades are allowed. Constraints: You must allow major version upgrades when specifying a value for the EngineVersion parameter that is a different major version than the DB cluster's current version.
latefinal
-
applyImmediately
↔ Output<
bool?> -
Specifies whether any cluster modifications
are applied immediately, or during the next maintenance window. Default is
false.latefinal -
arn
↔ Output<
String> -
ARN of cluster
latefinal
-
availabilityZones
↔ Output<
List< String> > -
A list of EC2 Availability Zones that instances in the DB cluster can be created in.
DocumentDB automatically assigns 3 AZs if less than 3 AZs are configured, which will show as a difference requiring resource recreation next pulumi up.
We recommend specifying 3 AZs or using the
lifecycleconfiguration blockignoreChangesargument if necessary.latefinal -
backupRetentionPeriod
↔ Output<
int?> -
The days to retain backups for. Default
1latefinal -
childResources
→ Set<
Resource> -
finalinherited
-
clusterIdentifier
↔ Output<
String> -
The cluster identifier. If omitted, the provider will assign a random, unique identifier.
latefinal
-
clusterIdentifierPrefix
↔ Output<
String> -
Creates a unique cluster identifier beginning with the specified prefix. Conflicts with
clusterIdentifier.latefinal -
clusterMembers
↔ Output<
List< String> > -
List of DocumentDB Instances that are a part of this cluster
latefinal
-
clusterResourceId
↔ Output<
String> -
The DocumentDB Cluster Resource ID
latefinal
-
completionSources
↔ Map<
String, IOutputCompletionSource> -
latefinalinherited
-
dbClusterParameterGroupName
↔ Output<
String> -
A cluster parameter group to associate with the cluster.
latefinal
-
dbSubnetGroupName
↔ Output<
String> -
A DB subnet group to associate with this DB instance.
latefinal
-
deletionProtection
↔ Output<
bool?> -
A boolean value that indicates whether the DB cluster has deletion protection enabled. The database can't be deleted when deletion protection is enabled. Defaults to
false.latefinal -
enabledCloudwatchLogsExports
↔ Output<
List< String> ?> -
List of log types to export to cloudwatch. If omitted, no logs will be exported.
The following log types are supported:
audit,profiler.latefinal -
endpoint
↔ Output<
String> -
The DNS address of the DocumentDB instance
latefinal
-
engine
↔ Output<
String?> -
The name of the database engine to be used for this DB cluster. Defaults to
docdb. Valid values:docdb.latefinal -
engineVersion
↔ Output<
String> -
The database engine version. Updating this argument results in an outage.
latefinal
-
finalSnapshotIdentifier
↔ Output<
String?> -
The name of your final DB snapshot
when this DB cluster is deleted. If omitted, no final snapshot will be
made.
latefinal
-
globalClusterIdentifier
↔ Output<
String?> -
The global cluster identifier specified on
aws.docdb.GlobalCluster.latefinal - hashCode → int
-
The hash code for this object.
no setterinherited
-
hostedZoneId
↔ Output<
String> -
The Route53 Hosted Zone ID of the endpoint
latefinal
-
id
↔ Output<
String> -
getter/setter pairinherited
- isCustom → bool
-
Returns whether this resource is provider-managed.
no setterinherited
- isProtected → bool
-
Returns whether this resource is protected from deletion.
no setterinherited
- isRemote → bool
-
Whether this resource is registered as remote.
no setterinherited
- isResourceReference → bool
-
Whether this instance represents a resource value returned over RPC.
finalinherited
-
kmsKeyId
↔ Output<
String> -
The ARN for the KMS encryption key. When specifying
kmsKeyId,storageEncryptedneeds to be set to true.latefinal -
manageMasterUserPassword
↔ Output<
bool?> -
Set to
trueto allow Amazon DocumentDB to manage the master user password in AWS Secrets Manager. Cannot be set ifmasterPasswordormasterPasswordWois provided.latefinal -
masterPassword
↔ Output<
String?> -
Password for the master DB user. Note that this may
show up in logs, and it will be stored in the state file. Please refer to the DocumentDB Naming Constraints. Conflicts with
masterPasswordWoandmanageMasterUserPassword.latefinal -
masterPasswordWo
↔ Output<
String?> -
NOTE: This field is write-only and its value will not be updated in state as part of read operations.
Password for the master DB user. Note that this may
show up in logs. Please refer to the DocumentDB Naming Constraints. Conflicts with
masterPasswordandmanageMasterUserPassword.latefinal -
masterPasswordWoVersion
↔ Output<
int?> -
Used together with
masterPasswordWoto trigger an update. Increment this value when an update to themasterPasswordWois required.latefinal -
masterUsername
↔ Output<
String> -
Username for the master DB user.
latefinal
-
masterUserSecrets
↔ Output<
List< ClusterMasterUserSecret> > -
latefinal
-
networkType
↔ Output<
String> -
The network type of the DB cluster (
IPV4orDUAL).latefinal -
port
↔ Output<
int?> -
The port on which the DB accepts connections
latefinal
-
preferredBackupWindow
↔ Output<
String> -
The daily time range during which automated backups are created if automated backups are enabled using the BackupRetentionPeriod parameter.Time in UTC
Default: A 30-minute window selected at random from an 8-hour block of time per regionE.g., 04:00-09:00
latefinal
-
preferredMaintenanceWindow
↔ Output<
String> -
The weekly time range during which system maintenance can occur, in (UTC) e.g., wed:04:00-wed:04:30
latefinal
-
readerEndpoint
↔ Output<
String> -
A read-only endpoint for the DocumentDB cluster, automatically load-balanced across replicas
latefinal
-
region
↔ Output<
String> -
Region where this resource will be managed. Defaults to the Region set in the provider configuration.
latefinal
-
resourceTransforms
→ List<
ResourceTransform> -
Inherited/explicit async transforms.
no setterinherited
-
restoreToPointInTime
↔ Output<
ClusterRestoreToPointInTime?> -
A configuration block for restoring a DB instance to an arbitrary point in time. Requires the
identifierargument to be set with the name of the new DB instance to be created. See Restore To Point In Time below for details.latefinal - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serverlessV2ScalingConfiguration
↔ Output<
ClusterServerlessV2ScalingConfiguration?> -
Scaling configuration of an Amazon DocumentDB Serverless cluster. See Serverless V2 Scaling Configuration below for details.
latefinal
-
skipFinalSnapshot
↔ Output<
bool?> -
Determines whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. If false is specified, a DB snapshot is created before the DB cluster is deleted, using the value from
finalSnapshotIdentifier. Default isfalse.latefinal -
snapshotIdentifier
↔ Output<
String?> -
Specifies whether or not to create this cluster from a snapshot. You can use either the name or ARN when specifying a DB cluster snapshot, or the ARN when specifying a DB snapshot. Automated snapshots should not be used for this attribute, unless from a different cluster. Automated snapshots are deleted as part of cluster destruction when the resource is replaced.
latefinal
-
storageEncrypted
↔ Output<
bool?> -
Specifies whether the DB cluster is encrypted. The default is
false.latefinal -
storageType
↔ Output<
String?> -
The storage type to associate with the DB cluster. Valid values:
standard,iopt1.latefinal -
A map of tags to assign to the DB cluster. If configured with a provider
defaultTagsconfiguration block present, tags with matching keys will overwrite those defined at the provider-level.latefinal -
A map of tags assigned to the resource, including those inherited from the provider
defaultTagsconfiguration block.latefinal -
transformations
→ List<
ResourceTransformation> -
Inherited/explicit legacy transformations.
no setterinherited
-
urn
↔ Output<
String> -
latefinalinherited
-
vpcSecurityGroupIds
↔ Output<
List< String> > -
List of VPC security groups to associate
with the Cluster
latefinal
Methods
-
failId(
Object error) → void -
Completes this resource ID with an error when registration fails.
inherited
-
failOutputs(
Object error) → void -
Completes all output properties with
error.inherited -
failUrn(
Object error) → void -
Completes this resource URN with an error when registration fails.
inherited
-
getProvider(
String moduleMember) → ProviderResource? -
Returns provider for
moduleMember's package, if configured.inherited -
getResourceName(
) → String -
Returns this resource's logical name.
inherited
-
getResourceType(
) → String -
Returns this resource's Pulumi type token.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerOutput<
T> (String propertyName, {Object? decoder(Object?)?, bool isSecret = false}) → Output< T> -
Registers a dynamic output property for this resource.
inherited
-
resolveId(
String? value, {required bool isKnown}) → void -
Resolves the provider-assigned ID for this resource.
inherited
-
resolveOutputs(
Struct outputs) → void -
Resolves all output properties from a monitor response payload.
inherited
-
resolveUrn(
String value) → void -
Resolves this resource's URN once assigned by the engine.
inherited
-
serializeProperties(
Map< String, dynamic> properties) → Future<Struct> -
Serializes resource properties for RPC transmission.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited