Resource: awsMemorydbCluster
Provides a MemoryDB Cluster.
More information about MemoryDB can be found in the Developer Guide.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.memorydbCluster.MemorydbCluster(this, "example", {
aclName: "open-access",
name: "my-cluster",
nodeType: "db.t4g.small",
numShards: 2,
securityGroupIds: ["${aws_security_group.example.id}"],
snapshotRetentionLimit: 7,
subnetGroupName: "${aws_memorydb_subnet_group.example.id}",
});
Argument Reference
The following arguments are required:
aclName
- (Required) The name of the Access Control List to associate with the cluster.nodeType
- (Required) The compute and memory capacity of the nodes in the cluster. See AWS documentation on supported node types as well as vertical scaling.
The following arguments are optional:
autoMinorVersionUpgrade
- (Optional, Forces new resource) When set totrue
, the cluster will automatically receive minor engine version upgrades after launch. Defaults totrue
.dataTiering
- (Optional, Forces new resource) Enables data tiering. This option is not supported by all instance types. For more information, see Data tiering.description
- (Optional) Description for the cluster. Defaults to"managedByTerraform"
.engineVersion
- (Optional) Version number of the Redis engine to be used for the cluster. Downgrades are not supported.finalSnapshotName
- (Optional) Name of the final cluster snapshot to be created when this resource is deleted. If omitted, no final snapshot will be made.kmsKeyArn
- (Optional, Forces new resource) ARN of the KMS key used to encrypt the cluster at rest.maintenanceWindow
- (Optional) Specifies the weekly time range during which maintenance on the cluster is performed. Specify as a range in the formatddd:hh24:miDdd:hh24:mi
(24H Clock UTC). The minimum maintenance window is a 60 minute period. Example:sun:23:00Mon:01:30
.name
- (Optional, Forces new resource) Name of the cluster. If omitted, Terraform will assign a random, unique name. Conflicts withnamePrefix
.namePrefix
- (Optional, Forces new resource) Creates a unique name beginning with the specified prefix. Conflicts withname
.numReplicasPerShard
- (Optional) The number of replicas to apply to each shard, up to a maximum of 5. Defaults to1
(i.e. 2 nodes per shard).numShards
- (Optional) The number of shards in the cluster. Defaults to1
.parameterGroupName
- (Optional) The name of the parameter group associated with the cluster.port
- (Optional, Forces new resource) The port number on which each of the nodes accepts connections. Defaults to6379
.securityGroupIds
- (Optional) Set of VPC Security Group ID-s to associate with this cluster.snapshotArns
- (Optional, Forces new resource) List of ARN-s that uniquely identify RDB snapshot files stored in S3. The snapshot files will be used to populate the new cluster. Object names in the ARN-s cannot contain any commas.snapshotName
- (Optional, Forces new resource) The name of a snapshot from which to restore data into the new cluster.snapshotRetentionLimit
- (Optional) The number of days for which MemoryDB retains automatic snapshots before deleting them. When set to0
, automatic backups are disabled. Defaults to0
.snapshotWindow
- (Optional) The daily time range (in UTC) during which MemoryDB begins taking a daily snapshot of your shard. Example:05:0009:00
.snsTopicArn
- (Optional) ARN of the SNS topic to which cluster notifications are sent.subnetGroupName
- (Optional, Forces new resource) The name of the subnet group to be used for the cluster. Defaults to a subnet group consisting of default VPC subnets.tags
- (Optional) A map of tags to assign to the resource. If configured with a providerdefaultTags
configuration block present, tags with matching keys will overwrite those defined at the provider-level.tlsEnabled
- (Optional, Forces new resource) A flag to enable in-transit encryption on the cluster. When set tofalse
, theaclName
must beopenAccess
. Defaults totrue
.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- Same asname
.arn
- The ARN of the cluster.clusterEndpoint
address
- DNS hostname of the cluster configuration endpoint.port
- Port number that the cluster configuration endpoint is listening on.enginePatchVersion
- Patch version number of the Redis engine used by the cluster.shards
- Set of shards in this cluster.name
- Name of this shard.numNodes
- Number of individual nodes in this shard.slots
- Keyspace for this shard. Example:016383
.nodes
- Set of nodes in this shard.availabilityZone
- The Availability Zone in which the node resides.createTime
- The date and time when the node was created. Example:20220101T21:00:00Z
.name
- Name of this node.endpoint
address
- DNS hostname of the node.port
- Port number that this node is listening on.
tagsAll
- A map of tags assigned to the resource, including those inherited from the providerdefaultTags
configuration block.
Timeouts
create
- (Default120M
)update
- (Default120M
)delete
- (Default120M
)
Import
Use the name
to import a cluster. For example: