Elastic Cluster
Manages an AWS DocDB (DocumentDB) Elastic Cluster.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.docdb.ElasticCluster("example", {
name: "my-docdb-cluster",
adminUserName: "foo",
adminUserPassword: "mustbeeightchars",
authType: "PLAIN_TEXT",
shardCapacity: 2,
shardCount: 1,
});
import pulumi
import pulumi_aws as aws
example = aws.docdb.ElasticCluster("example",
name="my-docdb-cluster",
admin_user_name="foo",
admin_user_password="mustbeeightchars",
auth_type="PLAIN_TEXT",
shard_capacity=2,
shard_count=1)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.DocDB.ElasticCluster("example", new()
{
Name = "my-docdb-cluster",
AdminUserName = "foo",
AdminUserPassword = "mustbeeightchars",
AuthType = "PLAIN_TEXT",
ShardCapacity = 2,
ShardCount = 1,
});
});
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 {
_, err := docdb.NewElasticCluster(ctx, "example", &docdb.ElasticClusterArgs{
Name: pulumi.String("my-docdb-cluster"),
AdminUserName: pulumi.String("foo"),
AdminUserPassword: pulumi.String("mustbeeightchars"),
AuthType: pulumi.String("PLAIN_TEXT"),
ShardCapacity: pulumi.Int(2),
ShardCount: pulumi.Int(1),
})
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.docdb.ElasticCluster;
import com.pulumi.aws.docdb.ElasticClusterArgs;
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 ElasticCluster("example", ElasticClusterArgs.builder()
.name("my-docdb-cluster")
.adminUserName("foo")
.adminUserPassword("mustbeeightchars")
.authType("PLAIN_TEXT")
.shardCapacity(2)
.shardCount(1)
.build());
}
}
resources:
example:
type: aws:docdb:ElasticCluster
properties:
name: my-docdb-cluster
adminUserName: foo
adminUserPassword: mustbeeightchars
authType: PLAIN_TEXT
shardCapacity: 2
shardCount: 1
Import
Using pulumi import
, import DocDB (DocumentDB) Elastic Cluster using the arn
argument. For example,
$ pulumi import aws:docdb/elasticCluster:ElasticCluster example arn:aws:docdb-elastic:us-east-1:000011112222:cluster/12345678-7abc-def0-1234-56789abcdef
Properties
Name of the Elastic DocumentDB cluster administrator
Password for the Elastic DocumentDB cluster administrator. Can contain any printable ASCII characters. Must be at least 8 characters
The number of days for which automatic snapshots are retained. It should be in between 1 and 35. If not specified, the default value of 1 is set.
The daily time range during which automated backups are created if automated backups are enabled, as determined by the backup_retention_period
.
Weekly time range during which system maintenance can occur in UTC. Format: ddd:hh24:mi-ddd:hh24:mi
. If not specified, AWS will choose a random 30-minute window on a random day of the week.
Number of vCPUs assigned to each elastic cluster shard. Maximum is 64. Allowed values are 2, 4, 8, 16, 32, 64
Number of shards assigned to the elastic cluster. Maximum is 32 The following arguments are optional:
List of VPC security groups to associate with the Elastic DocumentDB Cluster