Skip to content

resource/aws_elasticache_serverless_cache: user_group_id is not set to null after engine is updated to Valkey #42766

Open
@ccodreanu

Description

@ccodreanu

Terraform and AWS Provider Version

Terraform v1.11.3
on darwin_arm64
+ provider registry.terraform.io/hashicorp/aws v5.98.0

Your version of Terraform is out of date! The latest version
is 1.12.1. You can update by downloading from https://www.terraform.io/downloads.html

Affected Resource(s) or Data Source(s)

  • aws_elasticache_serverless_cache

Expected Behavior

It should update the state with attribute user_group_id set to null as deduced from the resource documentation.

Actual Behavior

AWS API errors out.

Relevant Error/Panic Output

│ Error: updating ElastiCache Serverless Cache (cache1-serverless)

│   with module.elasticache_serverless["cache1"].aws_elasticache_serverless_cache.elasticache,
│   on .terraform/modules/elasticache_serverless/aws-elasticache-serverless/main.tf line 17, in resource "aws_elasticache_serverless_cache" "elasticache":
│   17: resource "aws_elasticache_serverless_cache" "elasticache" {

│ operation error ElastiCache: ModifyServerlessCache, https response error StatusCode: 400, RequestID: 9c9c8b2c-d71b-4717-b62a-68cfa4b18aa9, InvalidParameterCombination: No
│ modifications were requested

Sample Terraform Configuration

Click to expand configuration
# module.elasticache_serverless["cache1"].aws_elasticache_serverless_cache.elasticache will be updated in-place
~ resource "aws_elasticache_serverless_cache" "elasticache" {
    ~ full_engine_version      = "7.2" -> (known after apply)
      id                       = "cache1-serverless"
      name                     = "cache1-serverless"
      tags                     = {
          "Name"        = "cache1-serverless"
      }
    - user_group_id            = "cache1-serverless" -> null
      # (13 unchanged attributes hidden)

      # (1 unchanged block hidden)
  }

Steps to Reproduce

  1. Have serverless cache running Redis 7 associated to its own user group having engine Redis
  2. Modify serverless cache in the AWS Console to use Valkey 7 as engine
  3. Modify user group to use engine Valkey
  4. Run Terraform apply

Debug Logging

Click to expand log output

GenAI / LLM Assisted Development

n/a

Important Facts and References

No response

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.service/elasticacheIssues and PRs that pertain to the elasticache service.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions