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/aws_backup_vault: Adding resource to manage AWS Backup vaults #7207

Merged
merged 14 commits into from
Feb 6, 2019

Conversation

slapula
Copy link
Contributor

@slapula slapula commented Jan 18, 2019

Reference #7166

Changes proposed in this pull request:

  • Adding resource to manage AWS Backup vaults: aws_backup_vault

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAwsBackupVault_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -parallel 20 -run=TestAccAwsBackupVault_ -timeout 120m
?   	github.com/terraform-providers/terraform-provider-aws	[no test files]
=== RUN   TestAccAwsBackupVault_basic
=== PAUSE TestAccAwsBackupVault_basic
=== RUN   TestAccAwsBackupVault_withKmsKey
=== PAUSE TestAccAwsBackupVault_withKmsKey
=== RUN   TestAccAwsBackupVault_withTags
=== PAUSE TestAccAwsBackupVault_withTags
=== CONT  TestAccAwsBackupVault_basic
=== CONT  TestAccAwsBackupVault_withTags
=== CONT  TestAccAwsBackupVault_withKmsKey
--- PASS: TestAccAwsBackupVault_withTags (8.01s)
--- PASS: TestAccAwsBackupVault_basic (8.10s)
--- PASS: TestAccAwsBackupVault_withKmsKey (33.02s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	33.050s

@ghost ghost added size/L Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. provider Pertains to the provider itself, rather than any interaction with AWS. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Jan 18, 2019
@slapula
Copy link
Contributor Author

slapula commented Jan 18, 2019

This is a quick write up of this resource without any proper testing yet. This PR should be marked as a work in progress until either #7164 or #7197 are merged into master.

@slapula
Copy link
Contributor Author

slapula commented Jan 26, 2019

This is what CI is failing on:

529.30s$ make lint
==> Checking source code against linters...
WARNING: deadline exceeded by linter staticcheck (try increasing --deadline)
WARNING: deadline exceeded by linter unparam (try increasing --deadline)
make: *** [lint] Error 2
The command "make lint" exited with 2.

Not sure what that's about. Running the linters locally don't return any errors for me.

@slapula
Copy link
Contributor Author

slapula commented Jan 28, 2019

I'm aware that the tests need to be fleshed out more here as well.

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. and removed size/L Managed by automation to categorize the size of a PR. labels Jan 31, 2019
@slapula
Copy link
Contributor Author

slapula commented Jan 31, 2019

I think this is ready for review now.

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.

Hey @slapula 😄 Thanks for submitting this. Please see the below initial feedback and let us know if you have any questions or do not have time to implement these items.

aws/resource_aws_backup_vault.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault.go Show resolved Hide resolved
aws/resource_aws_backup_vault.go Show resolved Hide resolved
aws/resource_aws_backup_vault.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault_test.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault_test.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault_test.go Outdated Show resolved Hide resolved
@bflad bflad added waiting-response Maintainers are waiting on response from community or contributor. new-resource Introduces a new resource. service/backup Issues and PRs that pertain to the backup service. labels Feb 4, 2019
@slapula
Copy link
Contributor Author

slapula commented Feb 5, 2019

@bflad This is ready for round two!

@ghost ghost removed the waiting-response Maintainers are waiting on response from community or contributor. label Feb 5, 2019
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.

Hey @slapula, a few more little things then good to go. Thanks!

aws/resource_aws_backup_vault.go Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault.go Outdated Show resolved Hide resolved
website/docs/r/backup_vault.html.markdown Outdated Show resolved Hide resolved
aws/resource_aws_backup_vault_test.go Outdated Show resolved Hide resolved
Type: schema.TypeString,
Required: true,
ForceNew: true,
ValidateFunc: validation.StringMatch(regexp.MustCompile(`[a-z0-9\-]+`), "must contain alphanumeric characters or underscores"),
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like there is a mismatch between the regex (contains a hyphen and no underscore) and the description (contains underscore and no hyphen). The API reference doesn't clear this up too well 🙁

They consist of lowercase letters, numbers, and hyphens.
Pattern: ^[a-zA-Z0-9\-\_\.]{1,50}$

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's....weird. It allows periods too? Um, okay. I'm going to just lift the API information and use it here even if it's not super clear.

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.

LGTM, thanks @slapula! 🚀

--- PASS: TestAccAwsBackupVault_basic (4.35s)
--- PASS: TestAccAwsBackupVault_withTags (4.70s)
--- PASS: TestAccAwsBackupVault_withKmsKey (23.39s)

@bflad bflad added this to the v1.58.0 milestone Feb 6, 2019
@bflad bflad merged commit 03dd9bf into hashicorp:master Feb 6, 2019
bflad added a commit that referenced this pull request Feb 6, 2019
@bflad
Copy link
Contributor

bflad commented Feb 8, 2019

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

@apeeters
Copy link
Contributor

apeeters commented Feb 8, 2019

Documentation available here: https://www.terraform.io/docs/providers/aws/r/backup_vault.html

@ghost
Copy link

ghost commented Apr 1, 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!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
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. new-resource Introduces a new resource. provider Pertains to the provider itself, rather than any interaction with AWS. service/backup Issues and PRs that pertain to the backup 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.

3 participants