Open lancehudson opened 6 years ago
This is impacting us as well, is there a way to accomplish this in TF?
https://github.com/terraform-providers/terraform-provider-aws/issues/5577 shows a work around that involves boto, but wondering if its possible to set the node-group-configuration from within TF
Any update or timeline when this could get done? We are needing it.
This is impacting us as well. any plans to fix this soon.
We are impacted as well, any plans to add this?
Has there any resolution already prepared for this ? We are also getting it.
Same issue for me also. getting error while creating cluster_replication_group from snapshot_arns
I tried to take stab at it kodelint/terraform-provider-aws Which basically adds following:
node_group_configuration {
slots = var.slots // Required - True
primary_availability_zone = var.primary_availability_zone // Required - False
replica_availability_zones = var.replica_availability_zones // Required - False
replica_count = var.replica_count // Required - False
}
I have given it spin and was able to implement it
resource "aws_elasticache_replication_group" "restore" {
replication_group_id = "tf-redis-cluster"
replication_group_description = "test description"
node_type = "cache.t2.small"
port = 6379
parameter_group_name = "default.redis3.2.cluster.on"
automatic_failover_enabled = true
snapshot_arns = [ "arn:aws:s3:::s3-bucket/snapshot-0001.rdb", "arn:aws:s3:::s3-bucket/snapshot-0002.rdb"]
node_group_configuration {
slots = [ "0-5461", "5462-10922" ]
}
cluster_mode {
replicas_per_node_group = 1
num_node_groups = 2
}
}
node_group_configuration
block added to enable creating Redis Cluster from snapshots, documented here@kodelint @tfproviders If your solutions are working as expected can you guys please create pull requests to get this merged into main provider. As our integration depend on original provider and they are updating other areas frequently.
The changes that @tfproviders implemented to fix this are forked here: https://github.com/hashicorp/terraform-provider-aws/compare/main...tfproviders:terraform-provider-aws:main (His full article is here: https://awstip.com/amazon-redis-cache-terraform-build-cluster-from-snapshots-not-supported-wait-what-770c3f94b57f)
Changes that @kodelint made are hearder to pin down since it appears the commit he linked to above was done at the same time as the entire repo was copied out (https://github.com/kodelint/terraform-provider-aws/commits/main)
However, based on the name of the @kodelint user being Satyajit Roy and the @tfproviders post being by a person with the exact same name - I'm guessing they the same person and so there's one existing solution to fix this?
Thanks
Hello @nikunjundhad and @pjpelegris Thanks for looking at the fork. I implemented these as my previous job required these feature. I am not in much use with these as of now. However, I plan to distribute and maintain these changes out of my tfproviders. Which can be downloaded from tfproviders/aws
@nikunjundhad I think I have submitted the PR sometime back, however not sure if it merged or not. I can try to create a new one with latest version.
@kodelint if you still have a working fix for this a PR (and a merge) would be greatly appreciated. Let me know if I can be of help, I don't mind updating your fork and creating the PR (as it is almost 20k commits behind now)
I have given it spin and was able to implement it
resource "aws_elasticache_replication_group" "restore" { replication_group_id = "tf-redis-cluster" replication_group_description = "test description" node_type = "cache.t2.small" port = 6379 parameter_group_name = "default.redis3.2.cluster.on" automatic_failover_enabled = true snapshot_arns = [ "arn:aws:s3:::s3-bucket/snapshot-0001.rdb", "arn:aws:s3:::s3-bucket/snapshot-0002.rdb"] node_group_configuration { slots = [ "0-5461", "5462-10922" ] } cluster_mode { replicas_per_node_group = 1 num_node_groups = 2 } }
node_group_configuration
block added to enable creating Redis Cluster from snapshots, documented here
Tried implementing this but getting error:
Blocks of type "node_group_configuration" are not expected here.
Community Note
Terraform Version
Terraform v0.11.7
Affected Resource(s)
aws_elasticache_replication_group
Terraform Configuration Files
Debug Output
Expected Behavior
Created redis cluster from snapshot
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References