Skip to content
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

ElastiCache cluster resource is 'broken' #374

Closed
hashibot opened this issue Jun 13, 2017 · 1 comment · Fixed by #4741
Closed

ElastiCache cluster resource is 'broken' #374

hashibot opened this issue Jun 13, 2017 · 1 comment · Fixed by #4741
Labels
bug Addresses a defect in current functionality. service/elasticache Issues and PRs that pertain to the elasticache service.

Comments

@hashibot
Copy link

This issue was originally opened by @FransUrbo as hashicorp/terraform#10127. It was migrated here as part of the provider split. The original body of the issue is below.


I can't seem to create a ElastiCache cluster (and I'm not entirely sure why - hence just 'broken').

The parameters is mutually exclusive, but when I try to set them, they don't work. See example resource definition below (with inline comments on different values).

I'm pretty sure this is documentation, but I'm not sure..

Terraform Version

0.7.8 (can't run 0.7.{9-10} because those are 'seriously' broken in other ways - several issues about that already exists).

Affected Resource(s)

  • aws_elasticache_cluster

Terraform Configuration Files

data "aws_availability_zones" "available" {}

resource "aws_elasticache_subnet_group" "main" {
  name                        = "elasticache-subnet-group"
  description                 = "Autoscaling events updating Route53"

  subnet_ids                  = [
    "${aws_subnet.main_0.id}",
    "${aws_subnet.main_1.id}",
    "${aws_subnet.main_2.id}"
  ]
}

# => Use of cache security groups is not permitted in this API version for your account.
#resource "aws_elasticache_security_group" "main" {
#  name                         = "elasticache-security-group"
#  security_group_names         = [
#    "${aws_security_group.main-all.name}"
#  ]
#}

resource "aws_elasticache_cluster" "autoscaling_event_update_route53" {
  cluster_id                    = "asgevnt-route53" # Maximum 16 chars - not documented anywhere in TF.

  engine                        = "redis"
  engine_version                = "3.2.4"
  port                          = 6379
  node_type                     = "cache.t2.micro" # Automatic failover is not supported for T1 and T2 cache node types - not documented anywhere in TF.
# => Must specify the same number of preferred availability zones as requested number of nodes.
#  num_cache_nodes               = "${length(data.aws_availability_zones.available.names)}"
# => Cannot create a Redis cluster with a NumCacheNodes parameter greater than 1.
#  num_cache_nodes               = 1 # According to docs, it can only be one. But when I  DO set it to "1", I get "Must specify the same number of preferred availability zones as requested number of nodes"..

  subnet_group_name             = "${aws_elasticache_subnet_group.main.name}"
# => Use of cache security groups is not permitted in this API version for your account.
#  security_group_ids            = ["${aws_elasticache_security_group.main.name}"]
  security_group_ids            = [
    "${aws_security_group.main-all.id}"
  ]
  parameter_group_name          = "default.redis3.2"

# => should be a list
  availability_zones            = "${data.aws_availability_zones.available.names}" # I thought this was SUPPOSED to be a list! ? But making it a list, gives me "Must specify the same number of preferred availability zones as requested number of nodes."

  apply_immediately             = "true"
  snapshot_arns                 = ["arn:aws:s3:::php-infrastructure-backups/autoscaling_event_update_route53.rdb"]
# => The requested configuration does not support snapshotting. Snapshot window parameter should not be specified.
#  snapshot_window               = "03:00-07:00"
# => The requested configuration does not support snapshotting. Snapshot retention limit parameter should not be specified.
#  snapshot_retention_limit      = "5"

  maintenance_window            = "sun:01:00-sun:02:00"

  tags {
    Name                        = "autoscaling_event_update_route53"
    environment                 = "core"
    service                     = "main"
  }
}
@hashibot hashibot added the bug Addresses a defect in current functionality. label Jun 13, 2017
@radeksimko radeksimko added the service/elasticache Issues and PRs that pertain to the elasticache service. label Jan 25, 2018
@ghost
Copy link

ghost commented Apr 5, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/elasticache Issues and PRs that pertain to the elasticache service.
Projects
None yet
2 participants