Skip to content

The terraform module for setup elasticache on AWS cloud

License

Notifications You must be signed in to change notification settings

pogosoftware/terraform-aws-elasticache

Repository files navigation

terraform-aws-elasticache

Requirements

Name Version
terraform ~> 1.0

Providers

No providers.

Modules

Name Source Version
parameter_group ./modules/parameter_group n/a
replication_group ./modules/replication_group n/a
subnet_group ./modules/subnet_group n/a
user ./modules/user n/a
user_group ./modules/user_group n/a

Resources

No resources.

Inputs

Name Description Type Default Required
create_parameter_group Determinate to creates parameter_group resources or not string true no
create_replication_group Determinate to creates replication_group resources or not string true no
create_subnet_group Determinate to creates subnet_group resources or not string true no
parameter_group_description The description of the ElastiCache parameter group. Defaults to Managed by Terraform string "Managed by Terraform" no
parameter_group_family Required if create_parameter_group is set to true. The family of the ElastiCache parameter group string "" no
parameter_group_name Required if create_parameter_group is set to true. The name of the ElastiCache parameter group string "" no
parameter_group_parameters A list of ElastiCache parameters to apply
list(object({
name = string
value = string
}))
[] no
parameter_group_tags Key-value mapping of resource tags map(string) {} no
replication_group_apply_immediately Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is false bool false no
replication_group_at_rest_encryption_enabled Whether to enable encryption at rest bool null no
replication_group_auth_token Password used to access a password protected server. Can be specified only if transit_encryption_enabled = true string null no
replication_group_auto_minor_version_upgrade Specifies whether minor version engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Only supported for engine type "redis" and if the engine version is 6 or higher. Defaults to true bool true no
replication_group_automatic_failover_enabled Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. If enabled, number_cache_clusters must be greater than 1. Must be enabled for Redis (cluster mode enabled) replication groups. Defaults to false bool false no
replication_group_data_tiering_enabled Enables data tiering. Data tiering is only supported for replication groups using the r6gd node type. This parameter must be set to true when using r6gd nodes bool null no
replication_group_description Required if create_replication_group is set to true. User-created description for the replication group string "" no
replication_group_engine Name of the cache engine to be used for the clusters in this replication group. The only valid value is redis string "redis" no
replication_group_engine_version Version number of the cache engine to be used for the cache clusters in this replication group. If the version is 6 or higher, the major and minor version can be set, e.g., 6.2, or the minor version can be unspecified which will use the latest version at creation time, e.g., 6.x. Otherwise, specify the full version desired, e.g., 5.0.6. The actual engine version used is returned in the attribute engine_version_actual string null no
replication_group_final_snapshot_identifier The name of your final node group (shard) snapshot. ElastiCache creates the snapshot from the primary node in the cluster. If omitted, no final snapshot will be made string null no
replication_group_global_replication_group_id The ID of the global replication group to which this replication group should belong string null no
replication_group_kms_key_id The ARN of the key that you wish to use if encrypting at rest. If not supplied, uses service managed encryption. Can be specified only if at_rest_encryption_enabled = true string null no
replication_group_log_delivery_configuration Specifies the destination and format of Redis SLOWLOG or Redis Engine Log list(map(string)) [] no
replication_group_maintenance_window 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 string null no
replication_group_multi_az_enabled Specifies whether to enable Multi-AZ Support for the replication group. If true, automatic_failover_enabled must also be enabled. Defaults to false bool false no
replication_group_node_type Instance class to be used string null no
replication_group_notification_topic_arn ARN of an SNS topic to send ElastiCache notifications to string null no
replication_group_num_cache_clusters Number of cache clusters (primary and replicas) this replication group will have. If Multi-AZ is enabled, the value of this parameter must be at least 2. Updates will occur before other modifications. Defaults to 1 string 1 no
replication_group_parameter_group_name Name of the parameter group to associate with this replication group string null no
replication_group_port 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 number null no
replication_group_preferred_cache_cluster_azs List of EC2 availability zones in which the replication group's cache clusters will be created list(string) [] no
replication_group_replication_group_id Required if create_replication_group is set to true. Replication group identifier. This parameter is stored as a lowercase string string "" no
replication_group_security_group_ids One or more Amazon VPC security groups associated with this replication group list(string) [] no
replication_group_security_group_names List of cache security group names to associate with this replication group list(string) [] no
replication_group_snapshot_arns List of ARNs that identify Redis RDB snapshot files stored in Amazon S3 list(string) [] no
replication_group_snapshot_name Name of a snapshot from which to restore data into the new node group string null no
replication_group_snapshot_retention_limit Number of days for which ElastiCache will retain automatic cache cluster snapshots before deleting them number null no
replication_group_snapshot_window Daily time range (in UTC) during which ElastiCache will begin taking a daily snapshot of your cache cluster string null no
replication_group_subnet_group_name Name of the cache subnet group to be used for the replication group string null no
replication_group_tags Map of tags to assign to the resource map(string) {} no
replication_group_transit_encryption_enabled Whether to enable encryption in transit bool null no
replication_group_user_group_ids User Group ID to associate with the replication group list(string) [] no
subnet_group_description Description for the cache subnet group. Defaults to Managed by Terraform string "Managed by Terraform" no
subnet_group_name Name for the cache subnet group string "" no
subnet_group_subnet_ids List of VPC Subnet IDs for the cache subnet group list(string) [] no
subnet_group_tags Key-value map of resource tags map(string) {} no
user_groups Map of user groups with group id as a key map(any) {} no
users Map of users to create where user_id is a key map(any) {} no

Outputs

Name Description
parameter_group_arn The AWS ARN associated with the parameter group
parameter_group_id The ElastiCache parameter group name
replication_group_arn ARN of the created ElastiCache Replication Group
replication_group_cluster_enabled Indicates if cluster mode is enabled
replication_group_configuration_endpoint_address Address of the replication group configuration endpoint when cluster mode is enabled
replication_group_engine_version_actual Because ElastiCache pulls the latest minor or patch for a version, this attribute returns the running version of the cache engine
replication_group_id ID of the ElastiCache Replication Group
replication_group_member_clusters Identifiers of all the nodes that are part of this replication group
replication_group_primary_endpoint_address (Redis only) Address of the endpoint for the primary node in the replication group, if the cluster mode is disabled
replication_group_reader_endpoint_address (Redis only) Address of the endpoint for the reader node in the replication group, if the cluster mode is disabled
subnet_group_name The Name of the ElastiCache Subnet Group
subnet_group_subnet_ids The Subnet IDs of the ElastiCache Subnet Group
user_groups The users group id
users The users id and arn