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

Add opt_in_to_archive_for_supported_resources attribute to AWS Backup Plan resource #34994

Conversation

mmourick
Copy link
Contributor

@mmourick mmourick commented Dec 19, 2023

Description

Adds opt_in_to_archive_for_supported_resources attribute to AWS Backup Plan resource

Relations

Closes #34880

References

Output from Acceptance Testing

make testacc TESTS=TestAccBackupPlan_ PKG=backup
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/backup/... -v -count 1 -parallel 20 -run='TestAccBackupPlan_'  -timeout 360m
=== RUN   TestAccBackupPlan_basic
=== PAUSE TestAccBackupPlan_basic
=== RUN   TestAccBackupPlan_withTags
=== PAUSE TestAccBackupPlan_withTags
=== RUN   TestAccBackupPlan_withRules
=== PAUSE TestAccBackupPlan_withRules
=== RUN   TestAccBackupPlan_withLifecycle
=== PAUSE TestAccBackupPlan_withLifecycle
=== RUN   TestAccBackupPlan_withRecoveryPointTags
=== PAUSE TestAccBackupPlan_withRecoveryPointTags
=== RUN   TestAccBackupPlan_RuleCopyAction_sameRegion
=== PAUSE TestAccBackupPlan_RuleCopyAction_sameRegion
=== RUN   TestAccBackupPlan_RuleCopyAction_noLifecycle
=== PAUSE TestAccBackupPlan_RuleCopyAction_noLifecycle
=== RUN   TestAccBackupPlan_RuleCopyAction_multiple
=== PAUSE TestAccBackupPlan_RuleCopyAction_multiple
=== RUN   TestAccBackupPlan_RuleCopyAction_crossRegion
=== PAUSE TestAccBackupPlan_RuleCopyAction_crossRegion
=== RUN   TestAccBackupPlan_advancedBackupSetting
=== PAUSE TestAccBackupPlan_advancedBackupSetting
=== RUN   TestAccBackupPlan_enableContinuousBackup
=== PAUSE TestAccBackupPlan_enableContinuousBackup
=== RUN   TestAccBackupPlan_disappears
=== PAUSE TestAccBackupPlan_disappears
=== CONT  TestAccBackupPlan_basic
=== CONT  TestAccBackupPlan_RuleCopyAction_noLifecycle
=== CONT  TestAccBackupPlan_withRules
=== CONT  TestAccBackupPlan_advancedBackupSetting
=== CONT  TestAccBackupPlan_enableContinuousBackup
=== CONT  TestAccBackupPlan_disappears
=== CONT  TestAccBackupPlan_withLifecycle
=== CONT  TestAccBackupPlan_RuleCopyAction_sameRegion
=== CONT  TestAccBackupPlan_withRecoveryPointTags
=== CONT  TestAccBackupPlan_RuleCopyAction_crossRegion
=== CONT  TestAccBackupPlan_RuleCopyAction_multiple
=== CONT  TestAccBackupPlan_withTags
--- PASS: TestAccBackupPlan_disappears (32.94s)
--- PASS: TestAccBackupPlan_basic (38.80s)
--- PASS: TestAccBackupPlan_RuleCopyAction_multiple (38.85s)
--- PASS: TestAccBackupPlan_enableContinuousBackup (38.85s)
--- PASS: TestAccBackupPlan_RuleCopyAction_crossRegion (42.89s)
--- PASS: TestAccBackupPlan_advancedBackupSetting (49.63s)
--- PASS: TestAccBackupPlan_RuleCopyAction_sameRegion (66.56s)
--- PASS: TestAccBackupPlan_RuleCopyAction_noLifecycle (70.14s)
--- PASS: TestAccBackupPlan_withRules (70.25s)
--- PASS: TestAccBackupPlan_withRecoveryPointTags (70.27s)
--- PASS: TestAccBackupPlan_withTags (70.28s)
--- PASS: TestAccBackupPlan_withLifecycle (92.33s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/backup     94.603s

Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/S Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/backup Issues and PRs that pertain to the backup service. labels Dec 19, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 19, 2023
@bschaatsbergen bschaatsbergen removed the needs-triage Waiting for first response or review from a maintainer. label Dec 19, 2023
@mmourick mmourick changed the title Add OptInToArchiveForSupportedResources attribute to AWS Backup Plan resource Add opt_in_to_archive_for_supported_resources attribute to AWS Backup Plan resource Dec 19, 2023
Copy link
Member

@bschaatsbergen bschaatsbergen left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

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 TESTARGS='-run=TestAccBackupPlan_' PKG=backup ACCTEST_PARALLELISM=3
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/backup/... -v -count 1 -parallel 3  -run=TestAccBackupPlan_ -timeout 360m
=== RUN   TestAccBackupPlan_basic
=== PAUSE TestAccBackupPlan_basic
=== RUN   TestAccBackupPlan_withTags
=== PAUSE TestAccBackupPlan_withTags
=== RUN   TestAccBackupPlan_withRules
=== PAUSE TestAccBackupPlan_withRules
=== RUN   TestAccBackupPlan_withLifecycle
=== PAUSE TestAccBackupPlan_withLifecycle
=== RUN   TestAccBackupPlan_withRecoveryPointTags
=== PAUSE TestAccBackupPlan_withRecoveryPointTags
=== RUN   TestAccBackupPlan_RuleCopyAction_sameRegion
=== PAUSE TestAccBackupPlan_RuleCopyAction_sameRegion
=== RUN   TestAccBackupPlan_RuleCopyAction_noLifecycle
=== PAUSE TestAccBackupPlan_RuleCopyAction_noLifecycle
=== RUN   TestAccBackupPlan_RuleCopyAction_multiple
=== PAUSE TestAccBackupPlan_RuleCopyAction_multiple
=== RUN   TestAccBackupPlan_RuleCopyAction_crossRegion
=== PAUSE TestAccBackupPlan_RuleCopyAction_crossRegion
=== RUN   TestAccBackupPlan_advancedBackupSetting
=== PAUSE TestAccBackupPlan_advancedBackupSetting
=== RUN   TestAccBackupPlan_enableContinuousBackup
=== PAUSE TestAccBackupPlan_enableContinuousBackup
=== RUN   TestAccBackupPlan_disappears
=== PAUSE TestAccBackupPlan_disappears
=== CONT  TestAccBackupPlan_basic
=== CONT  TestAccBackupPlan_RuleCopyAction_noLifecycle
=== CONT  TestAccBackupPlan_withLifecycle
--- PASS: TestAccBackupPlan_basic (25.28s)
=== CONT  TestAccBackupPlan_advancedBackupSetting
--- PASS: TestAccBackupPlan_RuleCopyAction_noLifecycle (53.91s)
=== CONT  TestAccBackupPlan_disappears
--- PASS: TestAccBackupPlan_advancedBackupSetting (36.45s)
=== CONT  TestAccBackupPlan_enableContinuousBackup
--- PASS: TestAccBackupPlan_disappears (19.61s)
=== CONT  TestAccBackupPlan_RuleCopyAction_crossRegion
--- PASS: TestAccBackupPlan_withLifecycle (81.96s)
=== CONT  TestAccBackupPlan_withRules
--- PASS: TestAccBackupPlan_enableContinuousBackup (23.27s)
=== CONT  TestAccBackupPlan_RuleCopyAction_multiple
--- PASS: TestAccBackupPlan_RuleCopyAction_crossRegion (34.48s)
=== CONT  TestAccBackupPlan_RuleCopyAction_sameRegion
--- PASS: TestAccBackupPlan_RuleCopyAction_multiple (24.47s)
=== CONT  TestAccBackupPlan_withRecoveryPointTags
--- PASS: TestAccBackupPlan_withRules (52.97s)
=== CONT  TestAccBackupPlan_withTags
--- PASS: TestAccBackupPlan_RuleCopyAction_sameRegion (52.15s)
--- PASS: TestAccBackupPlan_withRecoveryPointTags (50.78s)
--- PASS: TestAccBackupPlan_withTags (45.03s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/backup	185.944s

@ewbankkit
Copy link
Contributor

@mmourick Thanks for the contribution 🎉 👏.

@ewbankkit ewbankkit added the enhancement Requests to existing resources that expand the functionality or scope. label Jan 16, 2024
@ewbankkit ewbankkit merged commit bfcb1f0 into hashicorp:main Jan 16, 2024
53 checks passed
@github-actions github-actions bot added this to the v5.33.0 milestone Jan 16, 2024
Copy link

This functionality has been released in v5.33.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. Thank you!

@LLParse
Copy link

LLParse commented Jan 19, 2024

@mmourick @ewbankkit Moving from v5.32.1 to v5.33.0 breaks aws_backup_plan for AWS govcloud. I receive this error:

Error: creating Backup Plan: InvalidParameterValueException: Error in some rules due to : Invalid lifecycle. EBS Cold Tier is not yet supported.

This only happens on govcloud, commercial cloud deployment doesn't fail. I have tried setting opt_in_to_archive_for_supported_resources = false on every rule's lifecycle and I still get the error. As a hail mary, I have tried setting cold_storage_after = 0 on every rule's lifecycle as well and I still get the same error.

Unfortunately, we are pinned to 5.32.1 until this is remedied. Please feel free to correct me if I am using the module wrong. I have posted to this PR because it appears to be responsible, or at least related to the lifecycle changes for aws_backup_plan. Thanks.

Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. service/backup Issues and PRs that pertain to the backup service. size/S 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.

[Enhancement]: 'OptInToArchiveForSupportedResources' for aws backup service
4 participants