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 efs_file_system_backup_policy resource #18006

Merged
merged 11 commits into from
Jun 23, 2021

Conversation

shuheiktgw
Copy link
Collaborator

@shuheiktgw shuheiktgw commented Mar 9, 2021

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

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSEFSFileSystemBackupPolicy_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEFSFileSystemBackupPolicy_ -timeout 120m
=== RUN   TestAccAWSEFSFileSystemBackupPolicy_basic
=== PAUSE TestAccAWSEFSFileSystemBackupPolicy_basic
=== RUN   TestAccAWSEFSFileSystemBackupPolicy_disappears
=== PAUSE TestAccAWSEFSFileSystemBackupPolicy_disappears
=== CONT  TestAccAWSEFSFileSystemBackupPolicy_basic
=== CONT  TestAccAWSEFSFileSystemBackupPolicy_disappears
--- PASS: TestAccAWSEFSFileSystemBackupPolicy_basic (65.08s)
--- PASS: TestAccAWSEFSFileSystemBackupPolicy_disappears (78.31s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	80.294s

Original PR is #14670

@shuheiktgw shuheiktgw requested a review from a team as a code owner March 9, 2021 22:34
@ghost ghost added size/L Managed by automation to categorize the size of a PR. provider Pertains to the provider itself, rather than any interaction with AWS. service/backup Issues and PRs that pertain to the backup service. service/efs Issues and PRs that pertain to the efs service. labels Mar 9, 2021
@shuheiktgw shuheiktgw marked this pull request as draft March 9, 2021 22:34
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Mar 9, 2021
@shuheiktgw shuheiktgw force-pushed the add_efs_backup_policy_resource branch from 45f5a77 to c50fab2 Compare March 9, 2021 22:37
@ghost ghost added size/XL Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. documentation Introduces or discusses updates to documentation. and removed size/L Managed by automation to categorize the size of a PR. labels Mar 10, 2021
@shuheiktgw shuheiktgw marked this pull request as ready for review March 10, 2021 23:34
@shuheiktgw
Copy link
Collaborator Author

@DrFaust92 I've made it a separate resource so would you review the PR?

@pwlandoll
Copy link
Contributor

@shuheiktgw - it looks like there are some merge conflicts, resolving those might help to get this reviewed.

@petewilcock
Copy link

@shuheiktgw It'd be great to see this last conflict hurdle resolved and this merged in 🙏

@ewbankkit

This comment has been minimized.

@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Jun 22, 2021
@ewbankkit ewbankkit force-pushed the add_efs_backup_policy_resource branch from c1d78ce to d577344 Compare June 22, 2021 16:21
Acceptance test output:

% make testacc TEST=./aws TESTARGS='-run=TestAccAWSEFSFileSystemBackupPolicy_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEFSFileSystemBackupPolicy_ -timeout 180m
=== RUN   TestAccAWSEFSFileSystemBackupPolicy_basic
=== PAUSE TestAccAWSEFSFileSystemBackupPolicy_basic
=== RUN   TestAccAWSEFSFileSystemBackupPolicy_disappears_fs
=== PAUSE TestAccAWSEFSFileSystemBackupPolicy_disappears_fs
=== RUN   TestAccAWSEFSFileSystemBackupPolicy_update
=== PAUSE TestAccAWSEFSFileSystemBackupPolicy_update
=== CONT  TestAccAWSEFSFileSystemBackupPolicy_basic
=== CONT  TestAccAWSEFSFileSystemBackupPolicy_update
=== CONT  TestAccAWSEFSFileSystemBackupPolicy_disappears_fs
--- PASS: TestAccAWSEFSFileSystemBackupPolicy_disappears_fs (21.47s)
--- PASS: TestAccAWSEFSFileSystemBackupPolicy_basic (27.28s)
--- PASS: TestAccAWSEFSFileSystemBackupPolicy_update (48.63s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	53.197s
Acceptance test output:

% make testacc TEST=./aws TESTARGS='-run=TestAccAWSEFSBackupPolicy_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEFSBackupPolicy_ -timeout 180m
=== RUN   TestAccAWSEFSBackupPolicy_basic
=== PAUSE TestAccAWSEFSBackupPolicy_basic
=== RUN   TestAccAWSEFSBackupPolicy_disappears_fs
=== PAUSE TestAccAWSEFSBackupPolicy_disappears_fs
=== RUN   TestAccAWSEFSBackupPolicy_update
=== PAUSE TestAccAWSEFSBackupPolicy_update
=== CONT  TestAccAWSEFSBackupPolicy_basic
=== CONT  TestAccAWSEFSBackupPolicy_update
=== CONT  TestAccAWSEFSBackupPolicy_disappears_fs
--- PASS: TestAccAWSEFSBackupPolicy_disappears_fs (22.38s)
--- PASS: TestAccAWSEFSBackupPolicy_basic (28.27s)
--- PASS: TestAccAWSEFSBackupPolicy_update (50.06s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	53.142s
Acceptance test output:

% TEST=./aws SWEEP=us-east-1,us-west-2 SWEEPARGS=-sweep-run=aws_backup_vault make sweep
WARNING: This will destroy infrastructure. Use only in development accounts.
go test ./aws -v -sweep=us-east-1,us-west-2 -sweep-run=aws_backup_vault -timeout 60m
2021/06/23 11:17:07 [DEBUG] Running Sweepers for region (us-east-1):
2021/06/23 11:17:07 [DEBUG] Sweeper (aws_backup_vault) has dependency (aws_backup_vault_notifications), running..
2021/06/23 11:17:07 [DEBUG] Running Sweeper (aws_backup_vault_notifications) in region (us-east-1)
2021/06/23 11:17:07 [INFO] AWS Auth provider used: "EnvProvider"
2021/06/23 11:17:07 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/06/23 11:17:07 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/06/23 11:17:10 [DEBUG] Waiting for state to become: [success]
2021/06/23 11:17:10 [DEBUG] Sweeper (aws_backup_vault) has dependency (aws_backup_vault_policy), running..
2021/06/23 11:17:10 [DEBUG] Running Sweeper (aws_backup_vault_policy) in region (us-east-1)
2021/06/23 11:17:10 [INFO] Deleting Backup Vault Policies Default
2021/06/23 11:17:10 [DEBUG] Running Sweeper (aws_backup_vault) in region (us-east-1)
2021/06/23 11:17:10 [INFO] Skipping Backup Vault: Default
2021/06/23 11:17:10 [DEBUG] Sweeper (aws_backup_vault_notifications) already ran in region (us-east-1)
2021/06/23 11:17:10 [DEBUG] Sweeper (aws_backup_vault_policy) already ran in region (us-east-1)
2021/06/23 11:17:10 Sweeper Tests ran successfully:
	- aws_backup_vault_notifications
	- aws_backup_vault_policy
	- aws_backup_vault
2021/06/23 11:17:10 [DEBUG] Running Sweepers for region (us-west-2):
2021/06/23 11:17:10 [DEBUG] Sweeper (aws_backup_vault) has dependency (aws_backup_vault_notifications), running..
2021/06/23 11:17:10 [DEBUG] Running Sweeper (aws_backup_vault_notifications) in region (us-west-2)
2021/06/23 11:17:10 [INFO] AWS Auth provider used: "EnvProvider"
2021/06/23 11:17:10 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/06/23 11:17:10 [DEBUG] Trying to get account information via sts:GetCallerIdentity
2021/06/23 11:17:11 [DEBUG] Waiting for state to become: [success]
2021/06/23 11:17:11 [DEBUG] Waiting for state to become: [success]
2021/06/23 11:17:12 [DEBUG] Sweeper (aws_backup_vault) has dependency (aws_backup_vault_policy), running..
2021/06/23 11:17:12 [DEBUG] Running Sweeper (aws_backup_vault_policy) in region (us-west-2)
2021/06/23 11:17:12 [INFO] Deleting Backup Vault Policies Default
2021/06/23 11:17:13 [INFO] Deleting Backup Vault Policies aws/efs/automatic-backup-vault
2021/06/23 11:17:13 [DEBUG] Running Sweeper (aws_backup_vault) in region (us-west-2)
2021/06/23 11:17:14 [INFO] Skipping Backup Vault: Default
2021/06/23 11:17:14 [INFO] Skipping Backup Vault: aws/efs/automatic-backup-vault
2021/06/23 11:17:14 [DEBUG] Sweeper (aws_backup_vault_notifications) already ran in region (us-west-2)
2021/06/23 11:17:14 [DEBUG] Sweeper (aws_backup_vault_policy) already ran in region (us-west-2)
2021/06/23 11:17:14 Sweeper Tests ran successfully:
	- aws_backup_vault_notifications
	- aws_backup_vault_policy
	- aws_backup_vault
ok  	github.com/terraform-providers/terraform-provider-aws/aws	10.782s
@ewbankkit
Copy link
Contributor

@shuheiktgw Thanks for the contribution 🎉 👏.
To match the underlying AWS EFS API I have renamed this new resource to aws_efs_backup_policy.

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 🚀.

Commercial
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSEFSBackupPolicy_'                   
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEFSBackupPolicy_ -timeout 180m
=== RUN   TestAccAWSEFSBackupPolicy_basic
=== PAUSE TestAccAWSEFSBackupPolicy_basic
=== RUN   TestAccAWSEFSBackupPolicy_disappears_fs
=== PAUSE TestAccAWSEFSBackupPolicy_disappears_fs
=== RUN   TestAccAWSEFSBackupPolicy_update
=== PAUSE TestAccAWSEFSBackupPolicy_update
=== CONT  TestAccAWSEFSBackupPolicy_basic
=== CONT  TestAccAWSEFSBackupPolicy_update
=== CONT  TestAccAWSEFSBackupPolicy_disappears_fs
--- PASS: TestAccAWSEFSBackupPolicy_disappears_fs (21.46s)
--- PASS: TestAccAWSEFSBackupPolicy_basic (27.39s)
--- PASS: TestAccAWSEFSBackupPolicy_update (49.78s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	53.322s
GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSEFSBackupPolicy_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSEFSBackupPolicy_ -timeout 180m
=== RUN   TestAccAWSEFSBackupPolicy_basic
=== PAUSE TestAccAWSEFSBackupPolicy_basic
=== RUN   TestAccAWSEFSBackupPolicy_disappears_fs
=== PAUSE TestAccAWSEFSBackupPolicy_disappears_fs
=== RUN   TestAccAWSEFSBackupPolicy_update
=== PAUSE TestAccAWSEFSBackupPolicy_update
=== CONT  TestAccAWSEFSBackupPolicy_basic
=== CONT  TestAccAWSEFSBackupPolicy_update
=== CONT  TestAccAWSEFSBackupPolicy_disappears_fs
--- PASS: TestAccAWSEFSBackupPolicy_disappears_fs (24.32s)
--- PASS: TestAccAWSEFSBackupPolicy_basic (31.82s)
--- PASS: TestAccAWSEFSBackupPolicy_update (60.52s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	63.590s

@ewbankkit ewbankkit merged commit 3e77a11 into hashicorp:main Jun 23, 2021
@github-actions github-actions bot added this to the v3.47.0 milestone Jun 23, 2021
@github-actions
Copy link

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

@github-actions
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 Jul 25, 2021
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. provider Pertains to the provider itself, rather than any interaction with AWS. service/backup Issues and PRs that pertain to the backup service. service/efs Issues and PRs that pertain to the efs service. size/XL 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.

Add backup support for aws_efs_file_system
4 participants