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.87k stars 9.21k forks source link

[Bug]: ElastiCache replication group enabled Global Datastore is unnecessarily waiting to be dissociated when it's destroyed #38919

Open yuji-paypay opened 3 months ago

yuji-paypay commented 3 months ago

Terraform Core Version

5.62.0

AWS Provider Version

1.7.5

Affected Resource(s)

aws_elasticache_global_replication_group

elasticache_replication_group

Expected Behavior

The destruction should proceed without waiting for the dissociation of replica from Global DataStore after it's already dissociated

Actual Behavior

During destruction, it waits for dissociation of replica from Global Datastore and it just ends up timeout.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

Steps to Reproduce

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

Looks like there is no consideration about region. So it may be waiting for the primary when it is dissociating replica from global datastore https://github.com/hashicorp/terraform-provider-aws/blob/main/internal/service/elasticache/global_replication_group.go#L787

Actually I resolved this issue to have different ID between primary and replica

Would you like to implement a fix?

None

github-actions[bot] commented 3 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue