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]: InvalidParameterCombination: Serverless Cache modifications only support modifying one field per request. - ElastiCache Serverless Cache - security_group_ids #40461

Closed
georgegrayos opened this issue Dec 5, 2024 · 3 comments · Fixed by #40969
Labels
bug Addresses a defect in current functionality. service/elasticache Issues and PRs that pertain to the elasticache service.
Milestone

Comments

@georgegrayos
Copy link

georgegrayos commented Dec 5, 2024

Terraform Core Version

1.9.3

AWS Provider Version

5.78.0

Affected Resource(s)

aws_elasticache_serverless_cache

Expected Behavior

security group to have been changed

Actual Behavior

Error during apply when attempting to change the security group

Relevant Error/Panic Output Snippet

│ Error: updating ElastiCache Serverless Cache (platform-dev-cache)
  │ 
  │   with module.elasticache.aws_elasticache_serverless_cache.my_cache,
  │   on modules/elasticache/main.tf line 28, in resource "aws_elasticache_serverless_cache" "my_cache":
  │   28: resource "aws_elasticache_serverless_cache" "my_cache" {
  │ 
  │ operation error ElastiCache: ModifyServerlessCache, https response error
  │ StatusCode: 400, RequestID: <removed>,
  │ InvalidParameterCombination: Serverless Cache modifications only support
  │ modifying one field per request.

Terraform Configuration Files

resource "aws_elasticache_serverless_cache" "my_cache" {
  engine = "valkey"
  name   = "${var.stack_name}-cache"
  cache_usage_limits {
    data_storage {
      maximum = var.data_storage_gb
      unit    = "GB"
    }
    ecpu_per_second {
      maximum = var.ecpu_per_second
    }
  }
  description        = "serverless elasticache for ${var.stack_name}"
  subnet_ids         = var.subnet_ids
  user_group_id      = aws_elasticache_user_group.user_group.id
  security_group_ids = [aws_security_group.elasticache_sg.id]
}

Steps to Reproduce

  • Apply a aws_elasticache_serverless_cache using the default VPC (do not specify security_group_ids)
  • Add a security_group_ids value and re apply

Debug Output

12:41:55.899 STDOUT terraform:   ~ update in-place
12:41:55.899 STDOUT terraform: Terraform will perform the following actions:
12:41:55.899 STDOUT terraform:   # module.elasticache.aws_elasticache_serverless_cache.my_cache will be updated in-place
12:41:55.899 STDOUT terraform:   ~ resource "aws_elasticache_serverless_cache" "my_cache" {
12:41:55.899 STDOUT terraform:         id                       = "platform-dev-cache"
12:41:55.899 STDOUT terraform:         name                     = "platform-dev-cache"
12:41:55.899 STDOUT terraform:       ~ security_group_ids       = [
12:41:55.899 STDOUT terraform:           - "sg-<removed-1>",
12:41:55.899 STDOUT terraform:           + "sg-<removed-2>",
12:41:55.899 STDOUT terraform:         ]
12:41:55.899 STDOUT terraform:         # (14 unchanged attributes hidden)
12:41:55.899 STDOUT terraform:         # (1 unchanged block hidden)
12:41:55.899 STDOUT terraform:     }


// ....

12:42:03.705 STDERR terraform: ╷
12:42:03.705 STDERR terraform: │ Error: updating ElastiCache Serverless Cache (platform-dev-cache)
12:42:03.705 STDERR terraform: │ 
12:42:03.705 STDERR terraform: │   with module.elasticache.aws_elasticache_serverless_cache.my_cache,
12:42:03.705 STDERR terraform: │   on modules/elasticache/main.tf line 28, in resource "aws_elasticache_serverless_cache" "my_cache":
12:42:03.705 STDERR terraform: │   28: resource "aws_elasticache_serverless_cache" "my_cache" {
12:42:03.705 STDERR terraform: │ 
12:42:03.705 STDERR terraform: │ operation error ElastiCache: ModifyServerlessCache, https response error
12:42:03.705 STDERR terraform: │ StatusCode: 400, RequestID: <removed>,
12:42:03.705 STDERR terraform: │ InvalidParameterCombination: Serverless Cache modifications only support
12:42:03.705 STDERR terraform: │ modifying one field per request.
12:42:03.705 STDERR terraform: ╵

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

@georgegrayos georgegrayos added the bug Addresses a defect in current functionality. label Dec 5, 2024
Copy link

github-actions bot commented Dec 5, 2024

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added service/elasticache Issues and PRs that pertain to the elasticache service. needs-triage Waiting for first response or review from a maintainer. labels Dec 5, 2024
@georgegrayos georgegrayos changed the title [Bug]: InvalidParameterCombination: Serverless Cache modifications only support modifying one field per request. [Bug]: InvalidParameterCombination: Serverless Cache modifications only support modifying one field per request. - ElastiCache Serverless Cache - security_group_ids Dec 5, 2024
@justinretzolk
Copy link
Member

Similar #37499

@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Dec 10, 2024
Copy link

Warning

This issue has been closed, meaning that any additional comments are hard for our team to see. Please assume that the maintainers will not see them.

Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed.

@github-actions github-actions bot added this to the v5.85.0 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/elasticache Issues and PRs that pertain to the elasticache service.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants