Show / Hide Table of Contents

Class Cluster

Provides an ElastiCache Cluster resource, which manages a Memcached cluster or Redis instance. For working with Redis (Cluster Mode Enabled) replication groups, see the aws.elasticache.ReplicationGroup resource.

Note: When you change an attribute, such as node_type, by default it is applied in the next maintenance window. Because of this, this provider may report a difference in its planning phase because the actual modification has not yet taken place. You can use the apply_immediately flag to instruct the service to apply the change immediately. Using apply_immediately can result in a brief downtime as the server reboots. See the AWS Docs on Modifying an ElastiCache Cache Cluster for more information.

Example Usage

Memcached Cluster

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.ElastiCache.Cluster("example", new Aws.ElastiCache.ClusterArgs
    {
        Engine = "memcached",
        NodeType = "cache.m4.large",
        NumCacheNodes = 2,
        ParameterGroupName = "default.memcached1.4",
        Port = 11211,
    });
}

}

Redis Instance

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.ElastiCache.Cluster("example", new Aws.ElastiCache.ClusterArgs
    {
        Engine = "redis",
        EngineVersion = "3.2.10",
        NodeType = "cache.m4.large",
        NumCacheNodes = 1,
        ParameterGroupName = "default.redis3.2",
        Port = 6379,
    });
}

}

Redis Cluster Mode Disabled Read Replica Instance

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var replica = new Aws.ElastiCache.Cluster("replica", new Aws.ElastiCache.ClusterArgs
    {
        ReplicationGroupId = aws_elasticache_replication_group.Example.Id,
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Cluster
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Aws.ElastiCache
Assembly: Pulumi.Aws.dll
Syntax
public class Cluster : CustomResource

Constructors

View Source

Cluster(String, ClusterArgs, CustomResourceOptions)

Create a Cluster resource with the given unique name, arguments, and options.

Declaration
public Cluster(string name, ClusterArgs args = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

ClusterArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ApplyImmediately

Specifies whether any database modifications are applied immediately, or during the next maintenance window. Default is false. See Amazon ElastiCache Documentation for more information. (Available since v0.6.0)

Declaration
public Output<bool> ApplyImmediately { get; }
Property Value
Type Description
Output<System.Boolean>
View Source

Arn

Declaration
public Output<string> Arn { get; }
Property Value
Type Description
Output<System.String>
View Source

AvailabilityZone

The Availability Zone for the cache cluster. If you want to create cache nodes in multi-az, use preferred_availability_zones instead. Default: System chosen Availability Zone.

Declaration
public Output<string> AvailabilityZone { get; }
Property Value
Type Description
Output<System.String>
View Source

AzMode

Specifies whether the nodes in this Memcached node group are created in a single Availability Zone or created across multiple Availability Zones in the cluster's region. Valid values for this parameter are single-az or cross-az, default is single-az. If you want to choose cross-az, num_cache_nodes must be greater than 1

Declaration
public Output<string> AzMode { get; }
Property Value
Type Description
Output<System.String>
View Source

CacheNodes

List of node objects including id, address, port and availability_zone. Referenceable e.g. as ${aws_elasticache_cluster.bar.cache_nodes.0.address}

Declaration
public Output<ImmutableArray<ClusterCacheNode>> CacheNodes { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<ClusterCacheNode>>
View Source

ClusterAddress

(Memcached only) The DNS name of the cache cluster without the port appended.

Declaration
public Output<string> ClusterAddress { get; }
Property Value
Type Description
Output<System.String>
View Source

ClusterId

Group identifier. ElastiCache converts this name to lowercase

Declaration
public Output<string> ClusterId { get; }
Property Value
Type Description
Output<System.String>
View Source

ConfigurationEndpoint

(Memcached only) The configuration endpoint to allow host discovery.

Declaration
public Output<string> ConfigurationEndpoint { get; }
Property Value
Type Description
Output<System.String>
View Source

Engine

Name of the cache engine to be used for this cache cluster. Valid values for this parameter are memcached or redis

Declaration
public Output<string> Engine { get; }
Property Value
Type Description
Output<System.String>
View Source

EngineVersion

Version number of the cache engine to be used. See Describe Cache Engine Versions in the AWS Documentation center for supported versions

Declaration
public Output<string> EngineVersion { get; }
Property Value
Type Description
Output<System.String>
View Source

MaintenanceWindow

Specifies the weekly time range for when maintenance on the cache cluster is performed. The format is ddd:hh24:mi-ddd:hh24:mi (24H Clock UTC). The minimum maintenance window is a 60 minute period. Example: sun:05:00-sun:09:00

Declaration
public Output<string> MaintenanceWindow { get; }
Property Value
Type Description
Output<System.String>
View Source

NodeType

The compute and memory capacity of the nodes. See Available Cache Node Types for supported node types

Declaration
public Output<string> NodeType { get; }
Property Value
Type Description
Output<System.String>
View Source

NotificationTopicArn

An Amazon Resource Name (ARN) of an SNS topic to send ElastiCache notifications to. Example: arn:aws:sns:us-east-1:012345678999:my_sns_topic

Declaration
public Output<string> NotificationTopicArn { get; }
Property Value
Type Description
Output<System.String>
View Source

NumCacheNodes

The initial number of cache nodes that the cache cluster will have. For Redis, this value must be 1. For Memcache, this value must be between 1 and 20. If this number is reduced on subsequent runs, the highest numbered nodes will be removed.

Declaration
public Output<int> NumCacheNodes { get; }
Property Value
Type Description
Output<System.Int32>
View Source

ParameterGroupName

Name of the parameter group to associate with this cache cluster

Declaration
public Output<string> ParameterGroupName { get; }
Property Value
Type Description
Output<System.String>
View Source

Port

The port number on which each of the cache nodes will accept connections. For Memcache the default is 11211, and for Redis the default port is 6379. Cannot be provided with replication_group_id.

Declaration
public Output<int> Port { get; }
Property Value
Type Description
Output<System.Int32>
View Source

PreferredAvailabilityZones

A list of the Availability Zones in which cache nodes are created. If you are creating your cluster in an Amazon VPC you can only locate nodes in Availability Zones that are associated with the subnets in the selected subnet group. The number of Availability Zones listed must equal the value of num_cache_nodes. If you want all the nodes in the same Availability Zone, use availability_zone instead, or repeat the Availability Zone multiple times in the list. Default: System chosen Availability Zones. Detecting drift of existing node availability zone is not currently supported. Updating this argument by itself to migrate existing node availability zones is not currently supported and will show a perpetual difference.

Declaration
public Output<ImmutableArray<string>> PreferredAvailabilityZones { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

ReplicationGroupId

The ID of the replication group to which this cluster should belong. If this parameter is specified, the cluster is added to the specified replication group as a read replica; otherwise, the cluster is a standalone primary that is not part of any replication group.

Declaration
public Output<string> ReplicationGroupId { get; }
Property Value
Type Description
Output<System.String>
View Source

SecurityGroupIds

One or more VPC security groups associated with the cache cluster

Declaration
public Output<ImmutableArray<string>> SecurityGroupIds { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SecurityGroupNames

List of security group names to associate with this cache cluster

Declaration
public Output<ImmutableArray<string>> SecurityGroupNames { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SnapshotArns

A single-element string list containing an Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. Example: arn:aws:s3:::my_bucket/snapshot1.rdb

Declaration
public Output<ImmutableArray<string>> SnapshotArns { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

SnapshotName

The name of a snapshot from which to restore data into the new node group. Changing the snapshot_name forces a new resource.

Declaration
public Output<string> SnapshotName { get; }
Property Value
Type Description
Output<System.String>
View Source

SnapshotRetentionLimit

The number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them. For example, if you set SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. Please note that setting a snapshot_retention_limit is not supported on cache.t1.micro or cache.t2.* cache nodes

Declaration
public Output<int?> SnapshotRetentionLimit { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

SnapshotWindow

The daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster. Example: 05:00-09:00

Declaration
public Output<string> SnapshotWindow { get; }
Property Value
Type Description
Output<System.String>
View Source

SubnetGroupName

Name of the subnet group to be used for the cache cluster.

Declaration
public Output<string> SubnetGroupName { get; }
Property Value
Type Description
Output<System.String>
View Source

Tags

A map of tags to assign to the resource

Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>

Methods

View Source

Get(String, Input<String>, ClusterState, CustomResourceOptions)

Get an existing Cluster resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Cluster Get(string name, Input<string> id, ClusterState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

ClusterState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Cluster
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.