github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/website/source/docs/providers/aws/r/elasticache_replication_group.html.markdown (about) 1 --- 2 layout: "aws" 3 page_title: "AWS: aws_elasticache_replication_group" 4 sidebar_current: "docs-aws-resource-elasticache-replication-group" 5 description: |- 6 Provides an ElastiCache Replication Group resource. 7 --- 8 9 # aws\_elasticache\_replication\_group 10 11 Provides an ElastiCache Replication Group resource. 12 13 ## Example Usage 14 15 ```hcl 16 resource "aws_elasticache_replication_group" "bar" { 17 replication_group_id = "tf-rep-group-1" 18 replication_group_description = "test description" 19 node_type = "cache.m1.small" 20 number_cache_clusters = 2 21 port = 6379 22 parameter_group_name = "default.redis3.2" 23 availability_zones = ["us-west-2a", "us-west-2b"] 24 automatic_failover_enabled = true 25 } 26 ``` 27 28 ~> **Note:** We currently do not support passing a `primary_cluster_id` in order to create the Replication Group. 29 30 ~> **Note:** Automatic Failover is unavailable for Redis versions earlier than 2.8.6, 31 and unavailable on T1 and T2 node types. See the [Amazon Replication with 32 Redis](http://docs.aws.amazon.com/en_en/AmazonElastiCache/latest/UserGuide/Replication.html) guide 33 for full details on using Replication Groups. 34 35 36 ## Argument Reference 37 38 The following arguments are supported: 39 40 * `replication_group_id` – (Required) The replication group identifier. This parameter is stored as a lowercase string. 41 * `replication_group_description` – (Required) A user-created description for the replication group. 42 * `number_cache_clusters` - (Required) The number of cache clusters this replication group will have. 43 If Multi-AZ is enabled , the value of this parameter must be at least 2. Changing this number will force a new resource 44 * `node_type` - (Required) The compute and memory capacity of the nodes in the node group. 45 * `automatic_failover_enabled` - (Optional) Specifies whether a read-only replica will be automatically promoted to read/write primary if the existing primary fails. Defaults to `false`. 46 * `auto_minor_version_upgrade` - (Optional) Specifies whether a minor engine upgrades will be applied automatically to the underlying Cache Cluster instances during the maintenance window. Defaults to `true`. 47 * `availability_zones` - (Optional) A list of EC2 availability zones in which the replication group's cache clusters will be created. The order of the availability zones in the list is not important. 48 * `engine_version` - (Optional) The version number of the cache engine to be used for the cache clusters in this replication group. 49 * `parameter_group_name` - (Optional) The name of the parameter group to associate with this replication group. If this argument is omitted, the default cache parameter group for the specified engine is used. 50 * `port` – (Required) 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. 51 * `subnet_group_name` - (Optional) The name of the cache subnet group to be used for the replication group. 52 * `security_group_names` - (Optional) A list of cache security group names to associate with this replication group. 53 * `security_group_ids` - (Optional) One or more Amazon VPC security groups associated with this replication group. Use this parameter only when you are creating a replication group in an Amazon Virtual Private Cloud 54 * `snapshot_arns` – (Optional) A single-element string list containing an 55 Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. 56 Example: `arn:aws:s3:::my_bucket/snapshot1.rdb` 57 * `snapshot_name` - (Optional) The name of a snapshot from which to restore data into the new node group. Changing the `snapshot_name` forces a new resource. 58 * `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance 59 on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). 60 The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` 61 * `notification_topic_arn` – (Optional) An Amazon Resource Name (ARN) of an 62 SNS topic to send ElastiCache notifications to. Example: 63 `arn:aws:sns:us-east-1:012345678999:my_sns_topic` 64 * `snapshot_window` - (Optional, Redis only) The daily time range (in UTC) during which ElastiCache will 65 begin taking a daily snapshot of your cache cluster. Example: 05:00-09:00 66 * `snapshot_retention_limit` - (Optional, Redis only) The number of days for which ElastiCache will 67 retain automatic cache cluster snapshots before deleting them. For example, if you set 68 SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days 69 before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. 70 Please note that setting a `snapshot_retention_limit` is not supported on cache.t1.micro or cache.t2.* cache nodes 71 * `apply_immediately` - (Optional) Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`. 72 * `tags` - (Optional) A mapping of tags to assign to the resource 73 74 ## Attributes Reference 75 76 The following attributes are exported: 77 78 * `id` - The ID of the ElastiCache Replication Group. 79 * `primary_endpoint_address` - The address of the endpoint for the primary node in the replication group. If Redis, only present when cluster mode is disabled. 80 * `configuration_endpoint_address` - (Redis only) The address of the replication group configuration endpoint when cluster mode is enabled. 81 82 ## Import 83 84 ElastiCache Replication Groups can be imported using the `replication_group_id`, e.g. 85 86 ``` 87 $ terraform import aws_elasticache_replication_group.my_replication_group replication-group-1 88 ```