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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backup Plan deletion fails randomly #10414

Open
gui-don opened this issue Oct 7, 2019 · 0 comments
Labels

Comments

@gui-don
Copy link

@gui-don gui-don commented Oct 7, 2019

Hi!

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 "me too" comments, 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.11.14
provider.aws v2.19.0
provider.random v2.2.1

Affected Resource(s)

  • aws_backup_selection
  • aws_backup_plan

Terraform Configuration Files

Code can be found here: https://scm.dazzlingwrench.fxinnovation.com/fxinnovation-public/terraform-module-aws-backup/pulls/2/files

Expected Behavior

I expect all resources to be destroyed without issue.

Actual Behavior

Randomly, Terraform fails to delete Backup Plan, saying Backup Selections should be deleted before:

Error: Error applying plan:

1 error occurred:
	* module.default.aws_backup_plan.this (destroy): 1 error occurred:
	* aws_backup_plan.this: error deleting Backup Plan: InvalidRequestException: Related backup plan selections must be deleted prior to backup plan deletion
	status code: 400, request id: 170f2b1c-156e-4e77-97e3-9aacbd9b6d02

Even if the actual order of deletion is correct:

module.default.aws_backup_selection.by_resources: Destruction complete after 1s
module.default.aws_backup_selection.by_tags: Destruction complete after 1s
aws_ebs_volume.example: Destroying... (ID: vol-0f6fecced036d1281)
module.default.aws_iam_role.this: Destroying... (ID: tftestbtsaul9fRole)
module.default.aws_backup_plan.this: Destroying... (ID: 170f2b1c-156e-4e77-97e3-9aacbd9b6d02)

My bet is that AWS API returns an OK status for Backup Selection deletion before it鈥檚 actually true鈥

Steps to Reproduce

  1. terraform apply
  2. terraform destroy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can鈥檛 perform that action at this time.