Skip to content

[5.96.0] elasticache_replication_group: (after import) InvalidParameterCombination: Auth tokens can't be enabled with a user group already associated. Pass RemoveUserGroups to proceed. #42372

Open
@loganmzz

Description

@loganmzz

Terraform and AWS Provider Version

Terraform v1.9.7
on linux_amd64
+ provider registry.terraform.io/hashicorp/aws v5.96.0

Affected Resource(s) or Data Source(s)

  • aws_elasticache_replication_group

Expected Behavior

Able to successfully update/sync resource aws_elasticache_replication_group after an import

Actual Behavior

Error on apply just after import:

Relevant Error/Panic Output

Error: modifying ElastiCache Replication Group (my-elasticache-replication-group) authentication: operation error ElastiCache: ModifyReplicationGroup, https response error StatusCode: 400, RequestID: 01234567-89ab-cdef-0123-456789abcdef, InvalidParameterCombination: Auth tokens can't be enabled with a user group already associated. Pass RemoveUserGroups to proceed.

  with aws_elasticache_replication_group.self,
  on main.tf line 19, in resource "aws_elasticache_replication_group" "self":
  19: resource "aws_elasticache_replication_group" "self" {

Sample Terraform Configuration

Click to expand configuration
resource "aws_elasticache_replication_group" "self" {
   replication_group_id = "my-elasticache-replication-group"

  engine = "redis"
  engine_version = "7.1"
  cluster_mode = "disabled"
  parameter_group_name = "my-elasticache-parameter-group"

  user_group_ids = ["my-elasticache-user-group"]

  lifecycle {
    ignore_changes = [
      auth_token_update_strategy,
    ]
  }
}

Steps to Reproduce

  1. terraform import 'aws_elasticache_replication_group.self' 'my-elasticache-replication-group'
  2. terraform apply

Debug Logging

Click to expand log output

N/A

GenAI / LLM Assisted Development

n/a

Important Facts and References

Would you like to implement a fix?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAddresses a defect in current functionality.needs-triageWaiting for first response or review from a maintainer.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