github.com/minamijoyo/terraform@v0.7.8-0.20161029001309-18b3736ba44b/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 * `subnet_group_name` - (Optional) The name of the cache subnet group to be used for the replication group. 45 * `security_group_names` - (Optional) A list of cache security group names to associate with this replication group. 46 * `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 47 * `snapshot_arns` – (Optional) A single-element string list containing an 48 Amazon Resource Name (ARN) of a Redis RDB snapshot file stored in Amazon S3. 49 Example: `arn:aws:s3:::my_bucket/snapshot1.rdb` 50 * `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. 51 * `maintenance_window` – (Optional) Specifies the weekly time range for when maintenance 52 on the cache cluster is performed. The format is `ddd:hh24:mi-ddd:hh24:mi` (24H Clock UTC). 53 The minimum maintenance window is a 60 minute period. Example: `sun:05:00-sun:09:00` 54 * `notification_topic_arn` – (Optional) An Amazon Resource Name (ARN) of an 55 SNS topic to send ElastiCache notifications to. Example: 56 `arn:aws:sns:us-east-1:012345678999:my_sns_topic` 57 * `snapshot_window` - (Optional, Redis only) The daily time range (in UTC) during which ElastiCache will 58 begin taking a daily snapshot of your cache cluster. Example: 05:00-09:00 59 * `snapshot_retention_limit` - (Optional, Redis only) The number of days for which ElastiCache will 60 retain automatic cache cluster snapshots before deleting them. For example, if you set 61 SnapshotRetentionLimit to 5, then a snapshot that was taken today will be retained for 5 days 62 before being deleted. If the value of SnapshotRetentionLimit is set to zero (0), backups are turned off. 63 Please note that setting a `snapshot_retention_limit` is not supported on cache.t1.micro or cache.t2.* cache nodes 64 * `apply_immediately` - (Optional) Specifies whether any modifications are applied immediately, or during the next maintenance window. Default is `false`. 65 * `tags` - (Optional) A mapping of tags to assign to the resource 66 67 ## Attributes Reference 68 69 The following attributes are exported: 70 71 * `id` - The ID of the ElastiCache Replication Group. 72 * `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. 73 * `configuration_endpoint_address` - (Redis only) The address of the replication group configuration endpoint when cluster mode is enabled. 74 75 ## Import 76 77 ElastiCache Replication Groups can be imported using the `replication_group_id`, e.g. 78 79 ``` 80 $ terraform import aws_elasticache_replication_group.my_replication_group replication-group-1 81 ```