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 - lifecycle block in copy_action is optional #16116

Merged

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 #13165

Release note for CHANGELOG:

resource_aws_backup_plan - `lifecycle` block in `copy_action` is optional

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle (109.81s)
...

@DrFaust92 DrFaust92 requested a review from a team as a code owner November 10, 2020 13:59
@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. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 10, 2020
@DrFaust92 DrFaust92 added the bug Addresses a defect in current functionality. label Nov 10, 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.09s)
--- PASS: TestAccAwsBackupPlan_AdvancedBackupSetting (38.69s)
--- PASS: TestAccAwsBackupPlan_basic (40.35s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_Multiple (40.73s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (44.37s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle (71.12s)
--- PASS: TestAccAwsBackupPlan_withTags (74.60s)
--- PASS: TestAccAwsBackupPlan_withRecoveryPointTags (74.94s)
--- PASS: TestAccAwsBackupPlan_withRules (75.07s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_SameRegion (76.54s)
--- PASS: TestAccAwsBackupPlan_withLifecycle (85.19s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	85.351s

@breathingdust
Copy link
Member

LGTM 🚀 Thanks @DrFaust92 for the contribution!

Verified Acceptance Tests in Commercial (us-west-2)

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_SameRegion
=== CONT  TestAccAwsBackupPlan_withRecoveryPointTags
=== CONT  TestAccAwsBackupPlan_withLifecycle
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_Multiple
=== CONT  TestAccAwsBackupPlan_withRules
=== CONT  TestAccAwsBackupPlan_withTags
2020/11/13 08:38:22 [INFO] AWS Auth provider used: "SharedCredentialsProvider"
2020/11/13 08:38:22 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2020/11/13 08:38:22 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
2020/11/13 08:38:22 [WARN] Truncating attribute path of 0 diagnostics for TypeSet
--- PASS: TestAccAwsBackupPlan_disappears (19.52s)
2020/11/13 08:38:32 [DEBUG] Trying to get account information via sts:GetCallerIdentity
--- PASS: TestAccAwsBackupPlan_AdvancedBackupSetting (22.06s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_Multiple (22.59s)
--- PASS: TestAccAwsBackupPlan_basic (23.36s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (29.85s)
--- PASS: TestAccAwsBackupPlan_withRules (44.54s)
--- PASS: TestAccAwsBackupPlan_withRecoveryPointTags (44.72s)
--- PASS: TestAccAwsBackupPlan_withTags (46.46s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_SameRegion (46.89s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle (48.54s)
--- PASS: TestAccAwsBackupPlan_withLifecycle (57.22s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	59.386s

Verified Acceptance Tests in GovCloud (us-gov-west-1)

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_Rule_CopyAction_CrossRegion
=== CONT  TestAccAwsBackupPlan_withLifecycle
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_SameRegion
=== CONT  TestAccAwsBackupPlan_withRecoveryPointTags
=== CONT  TestAccAwsBackupPlan_withRules
=== CONT  TestAccAwsBackupPlan_AdvancedBackupSetting
=== CONT  TestAccAwsBackupPlan_withTags
=== CONT  TestAccAwsBackupPlan_disappears
=== CONT  TestAccAwsBackupPlan_Rule_CopyAction_Multiple
2020/11/13 08:39:45 [DEBUG] Trying to get account information via sts:GetCallerIdentity
--- PASS: TestAccAwsBackupPlan_disappears (14.48s)
--- PASS: TestAccAwsBackupPlan_basic (15.50s)
--- PASS: TestAccAwsBackupPlan_AdvancedBackupSetting (16.90s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_Multiple (17.21s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_CrossRegion (21.93s)
--- PASS: TestAccAwsBackupPlan_withRecoveryPointTags (32.30s)
--- PASS: TestAccAwsBackupPlan_withTags (32.75s)
--- PASS: TestAccAwsBackupPlan_withRules (34.55s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_SameRegion (36.52s)
--- PASS: TestAccAwsBackupPlan_Rule_CopyAction_NoLifecycle (36.70s)
--- PASS: TestAccAwsBackupPlan_withLifecycle (42.00s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	44.114s

@breathingdust breathingdust added this to the v3.16.0 milestone Nov 13, 2020
@breathingdust breathingdust merged commit 20e3718 into hashicorp:master Nov 13, 2020
breathingdust added a commit that referenced this pull request Nov 13, 2020
@ghost
Copy link

ghost commented Nov 18, 2020

This has been released in version 3.16.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 Dec 13, 2020

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!

@hashicorp hashicorp locked as resolved and limited conversation to collaborators Dec 13, 2020
@DrFaust92 DrFaust92 deleted the r/backup_plan_copy_action_optional branch April 15, 2021 10:38
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. service/backup Issues and PRs that pertain to the backup service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aws_backup_plan Rule Lifecycle Should Be Optional
3 participants