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

r/backup_plan - retry on delete + validations #16476

Merged
merged 2 commits into from
Dec 2, 2020

Conversation

DrFaust92
Copy link
Collaborator

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Closes #10414

Release note for CHANGELOG:

resource_aws_backup_plan - retry delete if selections are still attached
resource_aws_backup_plan - add plan time validations for `rule.rule_name`, `rule.target_vault_name` , `rule.lifecycle.delete_after`, `rule.copy_action.lifecycle.delete_after`, `advanced_backup_setting.resource_type 

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAwsBackupPlan_'
--- PASS: TestAccAwsBackupPlan_basic (51.36s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle (130.37s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_SameRegion (139.68s)
--- PASS: TestAccAwsBackupPlan_withLifecycle (209.53s)
--- PASS: TestAccAwsBackupPlan_withRecoveryPointTags (176.58s)
--- PASS: TestAccAwsBackupPlan_AdvancedBackupSetting (94.81s)
--- PASS: TestAccAwsBackupPlan_disappears (37.81s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (47.25s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_Multiple (47.56s)
--- PASS: TestAccAwsBackupPlan_withRules (169.26s)
--- PASS: TestAccAwsBackupPlan_withTags (123.17s)

@DrFaust92 DrFaust92 requested a review from a team as a code owner November 28, 2020 11:18
@ghost ghost added size/M Managed by automation to categorize the size of a PR. service/backup Issues and PRs that pertain to the backup service. labels Nov 28, 2020
@DrFaust92 DrFaust92 added bug Addresses a defect in current functionality. enhancement Requests to existing resources that expand the functionality or scope. labels Nov 28, 2020
Copy link
Contributor

@ewbankkit ewbankkit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

$ make testacc TEST=./aws TESTARGS='-run=TestAccAwsBackupPlan_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAwsBackupPlan_ -timeout 120m
=== RUN   TestAccAwsBackupPlan_basic
=== PAUSE TestAccAwsBackupPlan_basic
=== RUN   TestAccAwsBackupPlan_withTags
=== PAUSE TestAccAwsBackupPlan_withTags
=== RUN   TestAccAwsBackupPlan_withRules
=== PAUSE TestAccAwsBackupPlan_withRules
=== RUN   TestAccAwsBackupPlan_withLifecycle
=== PAUSE TestAccAwsBackupPlan_withLifecycle
=== RUN   TestAccAwsBackupPlan_withRecoveryPointTags
=== PAUSE TestAccAwsBackupPlan_withRecoveryPointTags
=== RUN   TestAccAwsBackupPlan_Rule_CopyAction_SameRegion
=== PAUSE TestAccAwsBackupPlan_Rule_CopyAction_SameRegion
=== RUN   TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle
=== PAUSE TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle
=== RUN   TestAccAwsBackupPlan_Rule_CopyAction_Multiple
=== PAUSE TestAccAwsBackupPlan_Rule_CopyAction_Multiple
=== RUN   TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion
=== PAUSE TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion
=== RUN   TestAccAwsBackupPlan_AdvancedBackupSetting
=== PAUSE TestAccAwsBackupPlan_AdvancedBackupSetting
=== RUN   TestAccAwsBackupPlan_disappears
=== PAUSE TestAccAwsBackupPlan_disappears
=== CONT  TestAccAwsBackupPlan_basic
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle
=== CONT  TestAccAwsBackupPlan_disappears
=== CONT  TestAccAwsBackupPlan_AdvancedBackupSetting
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_Multiple
=== CONT  TestAccAwsBackupPlan_withLifecycle
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_SameRegion
=== CONT  TestAccAwsBackupPlan_withRecoveryPointTags
=== CONT  TestAccAwsBackupPlan_withRules
=== CONT  TestAccAwsBackupPlan_withTags
--- PASS: TestAccAwsBackupPlan_disappears (35.91s)
--- PASS: TestAccAwsBackupPlan_basic (42.04s)
--- PASS: TestAccAwsBackupPlan_AdvancedBackupSetting (42.70s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_Multiple (42.82s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (44.20s)
--- PASS: TestAccAwsBackupPlan_withRecoveryPointTags (72.50s)
--- PASS: TestAccAwsBackupPlan_withRules (73.04s)
--- PASS: TestAccAwsBackupPlan_withTags (76.57s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle (77.55s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_SameRegion (78.34s)
--- PASS: TestAccAwsBackupPlan_withLifecycle (88.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	88.418s

@bflad bflad self-assigned this Dec 2, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise looking good

aws/resource_aws_backup_plan.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_plan.go Outdated Show resolved Hide resolved
Co-authored-by: Brian Flad <bflad417@gmail.com>
@bflad bflad self-requested a review December 2, 2020 17:30
@bflad bflad added this to the v3.20.0 milestone Dec 2, 2020
Copy link
Contributor

@bflad bflad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you @DrFaust92 🚀

Output from acceptance testing:

--- PASS: TestAccAwsBackupPlan_disappears (28.69s)
--- PASS: TestAccAwsBackupPlan_basic (32.26s)
--- PASS: TestAccAwsBackupPlan_AdvancedBackupSetting (32.54s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_Multiple (32.98s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (41.01s)
--- PASS: TestAccAwsBackupPlan_withTags (58.71s)
--- PASS: TestAccAwsBackupPlan_withRecoveryPointTags (58.79s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_SameRegion (58.91s)
--- PASS: TestAccAwsBackupPlan_withRules (59.84s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle (60.10s)
--- PASS: TestAccAwsBackupPlan_withLifecycle (65.80s)

@bflad bflad merged commit 9c386bf into hashicorp:master Dec 2, 2020
bflad added a commit that referenced this pull request Dec 2, 2020
@ghost
Copy link

ghost commented Dec 3, 2020

This has been released in version 3.20.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented Jan 2, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2021
@DrFaust92 DrFaust92 deleted the r/backup_plan_retry_delete branch April 15, 2021 10:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. enhancement Requests to existing resources that expand the functionality or scope. service/backup Issues and PRs that pertain to the backup service. size/M Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup Plan deletion fails randomly
3 participants