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

aws_elasticache_replication_group SnapshottingClusterId inference is incorrect in some cases #11539

Open
piotrb opened this issue Jan 9, 2020 · 4 comments
Labels
service/elasticache Issues and PRs that pertain to the elasticache service. waiting-response Maintainers are waiting on response from community or contributor.

Comments

@piotrb
Copy link

piotrb commented Jan 9, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

Terraform v0.12.19

  • provider.aws v2.39.0
  • provider.random v2.2.0
  • provider.template v2.1.2

Affected Resource(s)

aws_elasticache_replication_group

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

See #1499

Panic Output

Expected Behavior

See #1499

Actual Behavior

See #1499

Steps to Reproduce

  1. Create a non replicating single node redis cluster
  2. in the AWS Console UI, click "Add Replication" on that cluster (this seems to be the only way I found for "upgrading" an existing cluster like this).
  3. Add a replication group to TF and IMPORT a replication group with the same name of your original cluster
  4. Add a replica to the group in TF by setting number_cache_clusters to 2
  5. Try to enable snapshotting on this replication group

(same result as in #1499 happens)

Important Factoids

This is basically a re-open of #1499. I'm still experiencing a version of the original issue with the same error message.

It seems that the assumption in code as "fixed" in #14757 is just not correct in all cases.

It seems like when you upgrade an existing cluster for replication .. the naming conventions are different.

Perhaps the solution here is to not assume anything and just fetch the SnapshottingClusterId properly from the API. #1499 seems to say that this value is very much available in the API.

References

#1499

@piotrb piotrb changed the title aws_elasticache_replication_group SnapshottingClusterId inference is incorrect in all cases aws_elasticache_replication_group SnapshottingClusterId inference is incorrect in some cases Jan 9, 2020
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Jan 9, 2020
@piotrb
Copy link
Author

piotrb commented Jan 9, 2020

Alternatively perhaps just expose the "Backup Node Id" field or something as a way of overriding the option in TF .. AWS makes you choose the node when you enable backups.

Screen Shot 2020-01-09 at 9 55 38 AM

@piotrb
Copy link
Author

piotrb commented Jan 9, 2020

It seems like a workaround for this is to enable backups on the aws console then TF seems to play along

@piotrb
Copy link
Author

piotrb commented Jan 9, 2020

but still it seems like a weird assumption

@DrFaust92 DrFaust92 added the service/elasticache Issues and PRs that pertain to the elasticache service. label May 21, 2020
@justinretzolk
Copy link
Member

Hey @piotrb 👋 Thank you for taking the time to file this issue, and for the additional update. Given that there's been a number of AWS provider releases since the last update, can you confirm whether you're still experiencing this behavior?

@justinretzolk justinretzolk added waiting-response Maintainers are waiting on response from community or contributor. and removed needs-triage Waiting for first response or review from a maintainer. labels Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/elasticache Issues and PRs that pertain to the elasticache service. waiting-response Maintainers are waiting on response from community or contributor.
Projects
None yet
Development

No branches or pull requests

3 participants