hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.84k stars 9.19k forks source link

[Bug]: When expanding the plan for aws_elasticache_user_group.this to include new values learned so far during apply, #28449

Open devindersuri opened 1 year ago

devindersuri commented 1 year ago

Terraform Core Version

1.0.3

AWS Provider Version

~> 3.66

Affected Resource(s)

aws_elasticache_user_group

│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for aws_elasticache_user_group.this to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for .user_ids:
│ planned set element cty.StringVal("dummyredisId") does not correlate with any element in actual.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

Expected Behavior

It should create elastic search user

Actual Behavior

╷
│ Error: Provider produced inconsistent final plan
│ 
│ When expanding the plan for aws_elasticache_user_group.this to include new values learned so far during apply, provider "registry.terraform.io/hashicorp/aws" produced an invalid new value for .user_ids:
│ planned set element cty.StringVal("dummyredisId") does not correlate with any element in actual.
│ 
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
╵

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

child_module.txt root_module_mainfile.txt

Steps to Reproduce

terraform apply --auto-approve

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

jerome-lecorvaisier commented 1 year ago

I would suggest to change the user id dummyredisId from upper case to full lower case (as well as the group id).

Not related but good to know. Make sure the default user is part of the group. See https://github.com/hashicorp/terraform-provider-aws/issues/25593

justinretzolk commented 1 year ago

Hey @devindersuri 👋 Thank you for taking the time to raise this! Would it be possible to supply debug logs (redacted as needed) as well?

epomatti commented 1 year ago

I can confirm that Jerome's response worked for me, by using lowercase characters for the user name.