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

[Bug]: Removing Tags From Elasticache Serverless Cache Results in Error #2066

Open
alexoughton opened this issue Oct 16, 2024 · 1 comment
Open
Assignees
Labels

Comments

@alexoughton
Copy link

alexoughton commented Oct 16, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

Terraform v1.7.1
awscc provider v1.16.1

Affected Resource(s)

  • awscc_elasticache_serverless_cache

Terraform Configuration Files

resource "awscc_elasticache_serverless_cache" "cache" {
  count = var.external_redis ? 1 : 0

  engine                   = var.external_redis_engine
  major_engine_version     = var.external_redis_major_engine_version
  serverless_cache_name    = "${var.addon_context.eks_cluster_id}-argocd-cache"
  cache_usage_limits       = local.external_redis_cache_usage_limits
  description              = "ArgoCD elasticache for ${var.addon_context.eks_cluster_id}"
  kms_key_id               = aws_kms_key.cache[0].arn
  security_group_ids       = [aws_security_group.allow_redis[0].id]
  subnet_ids               = local.external_redis_subnet_ids
  user_group_id            = aws_elasticache_user_group.external_redis_user_group[0].id

  tags = [ for key, value in var.addon_context.tags : {
    key   = key
    value = value
  } ]
}

Panic Output

╷
│ Error: AWS SDK Go Service Operation Unsuccessful
│
│   with module.developer-enablement.module.multi_cluster_argocd[0].module.control_cluster[0].awscc_elasticache_serverless_cache.cache[0],
│   on .terraform/modules/developer-enablement/aws/custom_module/eks-blueprint-multi-cluster-argocd/modules/control-cluster/main.tf line 120, in resource "awscc_elasticache_serverless_cache" "cache":
│  120: resource "awscc_elasticache_serverless_cache" "cache" {
│
│ Calling Cloud Control API service UpdateResource operation returned: operation error CloudControl:
│ UpdateResource, https response error StatusCode: 400, RequestID: 4e0c00b9-96bc-4122-8561-7323af60713b, api error
│ ValidationException: index Out of bound, index is greater than 11

Expected Behavior

The tags are removed.

Actual Behavior

The tags are not removed, and the error occurs.

Steps to Reproduce

  1. terraform apply with a number of tags. This will succeed.
  2. terraform apply with fewer tags. The plan will look good, but apply will fail.

References

This seems to be very similar to the following two Issues:

#2046
#1544

@quixoticmonk
Copy link
Collaborator

Thank you for opening the issue @alexoughton . I am testing this on my end with the sample configuration I have and will update this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants