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

[NEW RESOURCE] AWS Backup Restore Testing #37039

Merged
merged 18 commits into from
Oct 4, 2024

Conversation

Thomas-Franklin
Copy link
Contributor

@Thomas-Franklin Thomas-Franklin commented Apr 22, 2024

Description

Introduces the aws_backup_restore_testing_plan and aws_backup-restore_selection resources. These resources manages the AWS Backup Restore Testing functionality within AWS.

Relations

Closes #34699.
Closes #36907.

References

Output from Acceptance Testing

BackupRestoreTestingPlan:

make testacc TESTS=TestAccBackupRestoreTestingPlan_\* PKG=backup
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/backup/... -v -count 1 -parallel 20 -run='TestAccBackupRestoreTestingPlan_*'  -timeout 360m
=== RUN   TestAccBackupRestoreTestingPlan_basic
=== PAUSE TestAccBackupRestoreTestingPlan_basic
=== RUN   TestAccBackupRestoreTestingPlan_disappears
=== PAUSE TestAccBackupRestoreTestingPlan_disappears
=== RUN   TestAccBackupRestoreTestingPlan_tags
=== PAUSE TestAccBackupRestoreTestingPlan_tags
=== RUN   TestAccBackupRestoreTestingPlan_includevaults
=== PAUSE TestAccBackupRestoreTestingPlan_includevaults
=== RUN   TestAccBackupRestoreTestingPlan_excludevaults
=== PAUSE TestAccBackupRestoreTestingPlan_excludevaults
=== RUN   TestAccBackupRestoreTestingPlan_additionals
=== PAUSE TestAccBackupRestoreTestingPlan_additionals
=== RUN   TestAccBackupRestoreTestingPlan_additionalwithupdates
=== PAUSE TestAccBackupRestoreTestingPlan_additionalwithupdates
=== CONT  TestAccBackupRestoreTestingPlan_basic
=== CONT  TestAccBackupRestoreTestingPlan_excludevaults
=== CONT  TestAccBackupRestoreTestingPlan_tags
=== CONT  TestAccBackupRestoreTestingPlan_additionalwithupdates
=== CONT  TestAccBackupRestoreTestingPlan_additionals
=== CONT  TestAccBackupRestoreTestingPlan_includevaults
=== CONT  TestAccBackupRestoreTestingPlan_disappears
--- PASS: TestAccBackupRestoreTestingPlan_disappears (11.29s)
--- PASS: TestAccBackupRestoreTestingPlan_basic (13.65s)
--- PASS: TestAccBackupRestoreTestingPlan_additionals (13.67s)
--- PASS: TestAccBackupRestoreTestingPlan_includevaults (19.38s)
--- PASS: TestAccBackupRestoreTestingPlan_excludevaults (19.41s)
--- PASS: TestAccBackupRestoreTestingPlan_tags (20.19s)
--- PASS: TestAccBackupRestoreTestingPlan_additionalwithupdates (21.60s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/backup	25.337s

BackupRestoreTestingSelection:

make testacc TESTS=TestAccBackupRestoreTestingSelection_\* PKG=backup
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/backup/... -v -count 1 -parallel 20 -run='TestAccBackupRestoreTestingSelection_*'  -timeout 360m
=== RUN   TestAccBackupRestoreTestingSelection_basic
=== PAUSE TestAccBackupRestoreTestingSelection_basic
=== RUN   TestAccBackupRestoreTestingSelection_disappears
=== PAUSE TestAccBackupRestoreTestingSelection_disappears
=== RUN   TestAccBackupRestoreTestingSelection_updates
=== PAUSE TestAccBackupRestoreTestingSelection_updates
=== CONT  TestAccBackupRestoreTestingSelection_basic
=== CONT  TestAccBackupRestoreTestingSelection_disappears
=== CONT  TestAccBackupRestoreTestingSelection_updates
--- PASS: TestAccBackupRestoreTestingSelection_disappears (17.21s)
--- PASS: TestAccBackupRestoreTestingSelection_basic (20.33s)
--- PASS: TestAccBackupRestoreTestingSelection_updates (29.72s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/backup	33.571s

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/XL 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. client-connections Pertains to the AWS Client and service connections. generators Relates to code generators. labels Apr 22, 2024
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 22, 2024
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Welcome @Thomas-Franklin 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added new-resource Introduces a new resource. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 23, 2024
@mervin-hemaraju-cko
Copy link

Heyy, when is this getting merged?

@jeroenhabets
Copy link

Please be aware there are two open PRs on this. This one and #36907

@Nirrleybo
Copy link

Any update on this being merged in?

@Thomas-Franklin Thomas-Franklin force-pushed the f-backup-restore-testing branch from dc681af to 3e54dde Compare July 10, 2024 09:50
@Thomas-Franklin Thomas-Franklin requested a review from a team as a code owner July 10, 2024 09:50
@Thomas-Franklin Thomas-Franklin force-pushed the f-backup-restore-testing branch from 3e54dde to 360a7cd Compare July 10, 2024 09:52
@Thomas-Franklin
Copy link
Contributor Author

Any update on this being merged in?

Not heard anything, but I have rebased it to make it easier for the owners to merge.

@ricoleabricot
Copy link

Up-ing this PR, as I think it could be merged as it (and recently rebased).
@justinretzolk any way we could have an ETA of merge + next provider version?

Copy link
Contributor

@aristosvo aristosvo left a comment

Choose a reason for hiding this comment

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

Hi @Thomas-Franklin!

Thanks for this PR! I'm 'just' another contributor who is also eager to get this resource in (better today than tomorrow 😄 ). I went through your PR and flagged some stuff that could use some change on a first look. I'm not a maintainer and cannot push this PR through, so don't expect too much of it 😺

If my comments are a bit short and need some explanation, please let me know.

internal/service/backup/find.go Outdated Show resolved Hide resolved
internal/service/backup/find.go Outdated Show resolved Hide resolved
internal/service/backup/find.go Outdated Show resolved Hide resolved
internal/service/backup/restore_testing_plan.go Outdated Show resolved Hide resolved
internal/service/backup/restore_testing_plan.go Outdated Show resolved Hide resolved
internal/service/backup/restore_testing_selection.go Outdated Show resolved Hide resolved
internal/service/backup/restore_testing_selection_test.go Outdated Show resolved Hide resolved
internal/service/backup/restore_testing_selection_test.go Outdated Show resolved Hide resolved
internal/service/backup/restore_testing_selection_test.go Outdated Show resolved Hide resolved
names/data/names_data.csv Outdated Show resolved Hide resolved
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

4 similar comments
Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

Copy link

Thank you for your contribution! 🚀

Please note that typically Go dependency changes are handled in this repository by dependabot or the maintainers. This is to prevent pull request merge conflicts and further delay reviews of contributions. Remove any changes to the go.mod or go.sum files and commit them into this pull request.

Additional details:

  • Check open pull requests with the dependencies label to view other dependency updates.
  • If this pull request includes an update the AWS Go SDK (or any other dependency) version, only updates submitted via dependabot will be merged. This pull request will need to remove these changes and will need to be rebased after the existing dependency update via dependabot has been merged for this pull request to be reviewed.
  • If this pull request is for supporting a new AWS service:
    • Ensure the new AWS service changes are following the Contributing Guide section on new services, in particular that the dependency addition and initial provider support are in a separate pull request from other changes (e.g. new resources). Contributions not following this item will not be reviewed until the changes are split.
    • If this pull request is already a separate pull request from the above item, you can ignore this message.

@Thomas-Franklin
Copy link
Contributor Author

@aristosvo - I believe I have addressed all your suggestions, appreciate the kind review!

Copy link
Contributor

@aristosvo aristosvo left a comment

Choose a reason for hiding this comment

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

Thanks a lot, @Thomas-Franklin, that cleans up some bits and pieces 👍🏽

I tried to run go build, saw some small issues + formatting. For a more complete guide on formatting and linting, see https://hashicorp.github.io/terraform-provider-aws/raising-a-pull-request/#go-coding-style

I'll probably run the tests one of these days, if I've time I will dive into the technical details of the resource to give feedback on that part.

internal/service/backup/exports_test.go Outdated Show resolved Hide resolved
internal/service/backup/restore_testing_plan_test.go Outdated Show resolved Hide resolved
@ewbankkit ewbankkit self-assigned this Oct 3, 2024
@github-actions github-actions bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 3, 2024
@github-actions github-actions bot added the sweeper Pertains to changes to or issues with the sweeper. label Oct 4, 2024
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=TestAccBackupRestoreTesting' PKG=backup ACCTEST_PARALLELISM=3 
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/backup/... -v -count 1 -parallel 3  -run=TestAccBackupRestoreTesting -timeout 360m
=== RUN   TestAccBackupRestoreTestingPlan_basic
=== PAUSE TestAccBackupRestoreTestingPlan_basic
=== RUN   TestAccBackupRestoreTestingPlan_disappears
=== PAUSE TestAccBackupRestoreTestingPlan_disappears
=== RUN   TestAccBackupRestoreTestingPlan_tags
=== PAUSE TestAccBackupRestoreTestingPlan_tags
=== RUN   TestAccBackupRestoreTestingPlan_includeVaults
=== PAUSE TestAccBackupRestoreTestingPlan_includeVaults
=== RUN   TestAccBackupRestoreTestingPlan_excludeVaults
=== PAUSE TestAccBackupRestoreTestingPlan_excludeVaults
=== RUN   TestAccBackupRestoreTestingPlan_additionals
=== PAUSE TestAccBackupRestoreTestingPlan_additionals
=== RUN   TestAccBackupRestoreTestingPlan_additionalsWithUpdate
=== PAUSE TestAccBackupRestoreTestingPlan_additionalsWithUpdate
=== RUN   TestAccBackupRestoreTestingSelection_basic
=== PAUSE TestAccBackupRestoreTestingSelection_basic
=== RUN   TestAccBackupRestoreTestingSelection_disappears
=== PAUSE TestAccBackupRestoreTestingSelection_disappears
=== RUN   TestAccBackupRestoreTestingSelection_updates
=== PAUSE TestAccBackupRestoreTestingSelection_updates
=== CONT  TestAccBackupRestoreTestingPlan_basic
=== CONT  TestAccBackupRestoreTestingPlan_additionals
=== CONT  TestAccBackupRestoreTestingPlan_includeVaults
--- PASS: TestAccBackupRestoreTestingPlan_basic (13.85s)
=== CONT  TestAccBackupRestoreTestingPlan_excludeVaults
--- PASS: TestAccBackupRestoreTestingPlan_additionals (13.86s)
=== CONT  TestAccBackupRestoreTestingPlan_tags
--- PASS: TestAccBackupRestoreTestingPlan_includeVaults (20.99s)
=== CONT  TestAccBackupRestoreTestingPlan_disappears
--- PASS: TestAccBackupRestoreTestingPlan_disappears (10.45s)
=== CONT  TestAccBackupRestoreTestingSelection_disappears
--- PASS: TestAccBackupRestoreTestingPlan_excludeVaults (19.68s)
=== CONT  TestAccBackupRestoreTestingSelection_updates
--- PASS: TestAccBackupRestoreTestingPlan_tags (27.97s)
=== CONT  TestAccBackupRestoreTestingPlan_additionalsWithUpdate
--- PASS: TestAccBackupRestoreTestingSelection_disappears (16.80s)
=== CONT  TestAccBackupRestoreTestingSelection_basic
--- PASS: TestAccBackupRestoreTestingSelection_updates (26.94s)
--- PASS: TestAccBackupRestoreTestingPlan_additionalsWithUpdate (20.10s)
--- PASS: TestAccBackupRestoreTestingSelection_basic (18.62s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/backup	72.175s

@jeroenhabets
Copy link

@ewbankkit as per your comment this PR seems to be about to get merged, could you please close competing PR #36907? TIA!

@ewbankkit ewbankkit merged commit e795bef into hashicorp:main Oct 4, 2024
40 checks passed
@github-actions github-actions bot added this to the v5.71.0 milestone Oct 4, 2024
@Thomas-Franklin Thomas-Franklin deleted the f-backup-restore-testing branch October 4, 2024 20:13
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Oct 15, 2024
Copy link

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

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 Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
client-connections Pertains to the AWS Client and service connections. documentation Introduces or discusses updates to documentation. generators Relates to code generators. new-resource Introduces a new resource. service/backup Issues and PRs that pertain to the backup service. size/XL Managed by automation to categorize the size of a PR. sweeper Pertains to changes to or issues with the sweeper. 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.

[New Resource]: aws_restore_testing_plan for Automatic restore testing and validation
8 participants