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

Second destroy will fail if snapshot is not skipped due to snapshot conflict #129

Open
nitrocode opened this issue Dec 28, 2021 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@nitrocode
Copy link
Member

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

If the cluster is created and destroyed and then created again and attempted a destroy again, the last destroy will fail because there is a snapshot with the same name as the last one.

│ Error: error deleting RDS Cluster (aurora-example-shared): DBClusterSnapshotAlreadyExistsFault: Cannot create the cluster snapshot because one with the identifier aurora-example-shared already exists.

Expected Behavior

Add a random id to the final snapshot when the cluster is created to avoid conflicts

@nitrocode nitrocode added the bug 🐛 An issue with the system label Dec 28, 2021
@johncblandii
Copy link

Can we get this resolved? It would be good to give control of this value.

  final_snapshot_identifier           = var.cluster_identifier == "" ? lower(module.this.id) : lower(var.cluster_identifier)

maybe with...

  final_snapshot_identifier           = coalesce(var.final_snapshot_identifier, var.cluster_identifier == "" ? lower(module.this.id) : lower(var.cluster_identifier))

...

variable "final_snapshot_identifier" {
  default = ""
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

2 participants