-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Conversation
This is what CI is failing on:
Not sure what that's about. Running the linters locally don't return any errors for me. |
I'm aware that the tests need to be fleshed out more here as well. |
I think this is ready for review now. |
There was a problem hiding this 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.
@bflad This is ready for round two! |
There was a problem hiding this 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
Type: schema.TypeString, | ||
Required: true, | ||
ForceNew: true, | ||
ValidateFunc: validation.StringMatch(regexp.MustCompile(`[a-z0-9\-]+`), "must contain alphanumeric characters or underscores"), |
There was a problem hiding this comment.
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}$
There was a problem hiding this comment.
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.
There was a problem hiding this 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)
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. |
Documentation available here: https://www.terraform.io/docs/providers/aws/r/backup_vault.html |
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! |
Reference #7166
Changes proposed in this pull request:
aws_backup_vault
Output from acceptance testing: