-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provider/aws: native redis clustering support for elasticache #14317
provider/aws: native redis clustering support for elasticache #14317
Conversation
Added support for provisioning a native redis cluster elasticache replication group. A new TypeSet attribute `cluster_mode` has been added. It requires the following fields: - `replicas_per_node_group` - The number of replica nodes in each node group - `num_node_groups` - The number of node groups for this Redis replication group Notes: - `automatic_failover_enabled` must be set to true. - `number_cache_clusters` is now a optional and computed field. If `cluster_mode` is set its value will be computed as: ```num_node_groups + num_node_groups * replicas_per_node_group``` Below is a sample config: resource "aws_elasticache_replication_group" "bar" { replication_group_id = "tf-redis-cluser" replication_group_description = "test description" node_type = "cache.t2.micro" port = 6379 parameter_group_name = "default.redis3.2.cluster.on" automatic_failover_enabled = true cluster_mode { replicas_per_node_group = 1 num_node_groups = 2 } }
…://github.com/dpetzold/terraform into dpetzold-aws-elasticache-native-redis3-cluster-support
We should error check up front on the use of num_cache_nodes and cluster_mode. This allows us to write a test to make sure all works as expected ``` % make testacc TEST=./builtin/providers/aws TESTARGS='-run=TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError' ==> Checking that code complies with gofmt requirements... go generate $(go list ./... | grep -v /terraform/vendor/) 2017/05/09 19:04:56 Generated command/internal_plugin_list.go TF_ACC=1 go test ./builtin/providers/aws -v -run=TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError -timeout 120m === RUN TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError --- PASS: TestAccAWSElasticacheReplicationGroup_clusteringAndCacheNodesCausesError (40.58s) PASS ok github.com/hashicorp/terraform/builtin/providers/aws 40.603s ```
Error Condition:
Clustering:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor doc nits
Cluster Mode (`cluster_mode`) supports the following: | ||
|
||
* `replicas_per_node_group` - (Required) Specify the number of replica nodes in each node group. Valid values are 0 to 5. Changing this number will force a new resource. | ||
* `num_node_groups - (Required) Specify the number of node groups (shards) for this Redis replication group. Changing this number will force a new resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing end quote here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also add note that a max of 1
items for cluster_mode
allowed.
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
No description provided.