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/storagegateway_smb_file_share - add support for notification_policy and access_based_enumeration + validations. #16414

Merged

Conversation

DrFaust92
Copy link
Collaborator

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

Release note for CHANGELOG:

resource_aws_storagegateway_smb_file_share - add support for `notification_policy` and `access_based_enumeration`.
resource_aws_storagegateway_smb_file_share - add plan time validation to `invalid_user_list` and `valid_user_list`.

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'
--- PASS: TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess (371.99s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration (569.62s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_notificationPolicy (521.46s)

@DrFaust92 DrFaust92 requested a review from a team as a code owner November 24, 2020 19:13
@ghost ghost added size/L Managed by automation to categorize the size of a PR. service/storagegateway Issues and PRs that pertain to the storagegateway service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Nov 24, 2020
@DrFaust92 DrFaust92 added the enhancement Requests to existing resources that expand the functionality or scope. label Nov 24, 2020
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 TEST=./aws TESTARGS='-run=TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration\|TestAccAWSStorageGatewaySmbFileShare_notificationPolicy'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration\|TestAccAWSStorageGatewaySmbFileShare_notificationPolicy -timeout 120m
=== RUN   TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== RUN   TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
=== CONT  TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== CONT  TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
--- PASS: TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration (358.74s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_notificationPolicy (379.62s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	379.700s
$ make testacc TEST=./aws TESTARGS='-run=TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory\|TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory\|TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess -timeout 120m
=== RUN   TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== RUN   TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
=== CONT  TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== CONT  TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
--- PASS: TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess (222.26s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory (794.34s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	794.402s

@breathingdust
Copy link
Member

LGTM 🚀 Thanks @DrFaust92

Note that the test failure in GovCloud is a known issue and is covered in: #16172

Verified Acceptance Tests in Commercial (us-west-2)

make testacc TEST=./aws TESTARGS='-run=TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration\|TestAccAWSStorageGatewaySmbFileShare_notificationPolicy'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration\|TestAccAWSStorageGatewaySmbFileShare_notificationPolicy -timeout 120m
=== RUN   TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== RUN   TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
=== CONT  TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== CONT  TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
--- PASS: TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration (333.24s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_notificationPolicy (364.64s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	366.321s

make testacc TEST=./aws TESTARGS='-run=TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory\|TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory\|TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess -timeout 120m
=== RUN   TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== RUN   TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
=== CONT  TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== CONT  TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
--- PASS: TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess (186.40s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory (760.79s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	762.630s

Verified Acceptance Tests in GovCloud (us-gov-west-1)

make testacc TEST=./aws TESTARGS='-run=TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration\|TestAccAWSStorageGatewaySmbFileShare_notificationPolicy'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration\|TestAccAWSStorageGatewaySmbFileShare_notificationPolicy -timeout 120m
=== RUN   TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== RUN   TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
=== CONT  TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration
=== CONT  TestAccAWSStorageGatewaySmbFileShare_notificationPolicy
--- PASS: TestAccAWSStorageGatewaySmbFileShare_notificationPolicy (326.31s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_accessBasedEnumeration (358.29s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	359.892s

make testacc TEST=./aws TESTARGS='-run=TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory\|TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory\|TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess -timeout 120m
=== RUN   TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== RUN   TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
=== PAUSE TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
=== CONT  TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
=== CONT  TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess
=== CONT  TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory
    resource_aws_storagegateway_smb_file_share_test.go:23: Step 1/2 error: Error running apply: 2020/11/26 10:24:48 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0

        Error: ClientException: Simple AD directory creation is currently not supported in this region. : RequestId: 4f546ea7-0334-4f5e-a4f7-e1b55ceb51b4 : RequestId: 4f546ea7-0334-4f5e-a4f7-e1b55ceb51b4
        {
          RespMetadata: {
            StatusCode: 400,
            RequestID: "4f546ea7-0334-4f5e-a4f7-e1b55ceb51b4"
          },
          Message_: "Simple AD directory creation is currently not supported in this region. : RequestId: 4f546ea7-0334-4f5e-a4f7-e1b55ceb51b4 : RequestId: 4f546ea7-0334-4f5e-a4f7-e1b55ceb51b4",
          RequestId: "4f546ea7-0334-4f5e-a4f7-e1b55ceb51b4"
        }


--- FAIL: TestAccAWSStorageGatewaySmbFileShare_Authentication_ActiveDirectory (20.81s)
--- PASS: TestAccAWSStorageGatewaySmbFileShare_Authentication_GuestAccess (235.85s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	237.450s
FAIL
make: *** [testacc] Error 1

@breathingdust breathingdust merged commit d6b5259 into hashicorp:master Nov 26, 2020
breathingdust added a commit that referenced this pull request Nov 26, 2020
@breathingdust breathingdust added this to the v3.19.0 milestone Nov 26, 2020
@ghost
Copy link

ghost commented Dec 1, 2020

This has been released in version 3.19.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 for triage. Thanks!

@ghost
Copy link

ghost commented Dec 27, 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 as resolved and limited conversation to collaborators Dec 27, 2020
@DrFaust92 DrFaust92 deleted the r/storagegateway_smb_file_share branch April 15, 2021 10:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/storagegateway Issues and PRs that pertain to the storagegateway service. size/L 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