hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.78k stars 9.13k forks source link

Add Feature for AWS Redis to create from non-aws backups #5577

Open parmarsumit opened 6 years ago

parmarsumit commented 6 years ago

Hi Team , Problem , i am creating a redis cluster from the rdb files taken from Datacenter redis with following config: `resource "aws_elasticache_replication_group" "default" { replication_group_id = "${var.tags["ApplicationName"]}" replication_group_description = "${var.tags["ApplicationName"]}" engine = "${var.engine}" engine_version = "${var.engine_version}" node_type = "${var.instance_type}"

number_cache_clusters = "${var.cluster_size}" - InvalidParameterCombination: Cannot scale up cluster mode enabled replication group.

port = "${var.port}" parameter_group_name = "${var.parameter_group_name}" automatic_failover_enabled = "${var.automatic_failover_enabled}" subnet_group_name = "${var.subnet_group_name}" #Check security.tf security_group_ids = ["${aws_security_group.default.id}"] #Check security.tf maintenance_window = "${var.maintenance_window}" at_rest_encryption_enabled = "${var.at_rest_encryption_enabled}" transit_encryption_enabled = "${var.transit_encryption_enabled}" snapshot_retention_limit = "${var.snapshot_retention_limit}"

_**snapshot_arns = ["${var.snapshot_arns}"]

snapshotname = "intgwbk"** cluster_mode { replicas_per_node_group = 1 num_node_groups = 3 }

tags = "${var.tags}" }`

This gets failed with Error :

Error creating Elasticache Replication Group: InvalidParameterCombination: Slots must be provided when restoring from snapshot ARNs with cluster mode enabled

Similar to issue .

to make it work need to add the NodeGroupConfguration as mentioned here 💯 https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.CreatingReplGroup.NoExistingCluster.Cluster.html --node-group-configuration \ "ReplicaCount=1,Slots=0-8999,PrimaryAvailabilityZone='us-east-1c',ReplicaAvailabilityZones='us-east-1b'" \ "ReplicaCount=2,Slots=9000-16383,PrimaryAvailabilityZone='us-east-1a',ReplicaAvailabilityZones='us-east-1a','us-east-1c'"

This is available from cli and boto library : https://boto3.readthedocs.io/en/latest/reference/services/elasticache.html

Similar issue . : 5118

geota commented 5 years ago

This is impacting my team as well and we are unable to restore a snapshot taken from a cluster redis using only terraform.

geota commented 5 years ago

One note, this also impacts snapshots taken from AWS native ElastiCache Redis clusters in cluster-mode and is not an issue limited to non-aws backups.

leigu commented 4 years ago

We need the exact same feature as well. Any update on this issue?

tgourley01 commented 4 years ago

We require redis in cluster mode as well

github-actions[bot] commented 2 years ago

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

mcansky commented 2 years ago

was that ever solved?