github.com/rhenning/terraform@v0.8.0-beta2/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 ~> **Note:** We currently do not support passing a `primary_cluster_id` in order to create the Replication Group. 14 15 ## Example Usage 16 17 ``` 18 resource "aws_elasticache_replication_group" "bar" { 19 replication_group_id = "tf-replication-group-1" 20 replication_group_description = "test description" 21 node_type = "cache.m1.small" 22 number_cache_clusters = 2 23 port = 6379 24 parameter_group_name = "default.redis2.8" 25 availability_zones = ["us-west-2a", "us-west-2b"] 26 automatic_failover_enabled = true 27 } 28 ``` 29 30 ## Argument Reference 31 32 The following arguments are supported: 33 34 * `replication_group_id` – (Required) The replication group identifier. This parameter is stored as a lowercase string. 35 * `replication_group_description` – (Required) A user-created description for the replication group. 36 * `number_cache_clusters` - (Required) The number of cache clusters this replication group will have. 37 If Multi-AZ is enabled , the value of this parameter must be at least 2. Changing this number will force a new resource 38 * `node_type` - (Required) The compute and memory capacity of the nodes in the node group. 39 * `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`. 40 * `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`. 41 * `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. 42 * `engine_version` - (Optional) The version number of the cache engine to be used for the cache clusters in this replication group. 43 * `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. 44 * `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. 45 * `subnet_group_name` - (Optional) The name of the cache subnet group to be used for the replication group. 46 * `security_group_names` - (Optional) A list of cache security group names to associate with this replication group. 47 * `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 48 * `snapshot_arns` – (Optional) A single-element string list containing an 49 Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. 50 Example: `arn:aws:s3:::my_bucket/snapshot1.rdb` 51 * `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. 52 * `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance 53 on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). 54 The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` 55 * `notification_topic_arn` – (Optional) An Amazon Resource Name (ARN) of an 56 SNS topic to send ElastiCache notifications to. Example: 57 `arn:aws:sns:us-east-1:012345678999:my_sns_topic` 58 * `snapshot_window` - (Optional, Redis only) The daily time range (in UTC) during which ElastiCache will 59 begin taking a daily snapshot of your cache cluster. Example: 05:00-09:00 60 * `snapshot_retention_limit` - (Optional, Redis only) The number of days for which ElastiCache will 61 retain automatic cache cluster snapshots before deleting them. For example, if you set 62 SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days 63 before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. 64 Please note that setting a `snapshot_retention_limit` is not supported on cache.t1.micro or cache.t2.* cache nodes 65 * `apply_immediately` - (Optional) Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`. 66 * `tags` - (Optional) A mapping of tags to assign to the resource 67 68 ## Attributes Reference 69 70 The following attributes are exported: 71 72 * `id` - The ID of the ElastiCache Replication Group. 73 * `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. 74 * `configuration_endpoint_address` - (Redis only) The address of the replication group configuration endpoint when cluster mode is enabled. 75 76 ## Import 77 78 ElastiCache Replication Groups can be imported using the `replication_group_id`, e.g. 79 80 ``` 81 $ terraform import aws_elasticache_replication_group.my_replication_group replication-group-1 82 ```