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/transfer_server - add security_policy_name and refactor tests #15375

Merged

Conversation

DrFaust92
Copy link
Collaborator

@DrFaust92 DrFaust92 commented Sep 27, 2020

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: #14694.
Closes: #15761.
Relates: #13527.

Release note for CHANGELOG:

resource_aws_transfer_server -  add `security_policy_name` argument

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccAWSTransferServer_'
--- PASS: TestAccAWSTransferServer_vpcEndpointId (196.21s)
--- PASS: TestAccAWSTransferServer_apigateway (235.13s)
--- PASS: TestAccAWSTransferServer_disappears (202.54s)
--- PASS: TestAccAWSTransferServer_Vpc (357.24s)
--- PASS: TestAccAWSTransferServer_securityPolicy (247.52s)
--- PASS: TestAccAWSTransferServer_forcedestroy (199.85s)
--- PASS: TestAccAWSTransferServer_hostKey (182.57s)

@ghost ghost added size/XL Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. service/transfer Issues and PRs that pertain to the transfer service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. labels Sep 27, 2020
@DrFaust92 DrFaust92 added the enhancement Requests to existing resources that expand the functionality or scope. label Sep 27, 2020
@DrFaust92 DrFaust92 marked this pull request as ready for review September 27, 2020 20:46
@DrFaust92 DrFaust92 requested a review from a team September 27, 2020 20:46
Base automatically changed from master to main January 23, 2021 00:59
@breathingdust breathingdust requested a review from a team as a code owner January 23, 2021 00:59
add `security_policy_name`
@ewbankkit ewbankkit self-assigned this May 5, 2021
@ewbankkit ewbankkit force-pushed the r/transfer_server_security_policy branch from 06a00b8 to 3bac968 Compare May 5, 2021 21:05
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=TestAccAWSTransferServer_\|TestAccDataSourceAwsTransferServer_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSTransferServer_\|TestAccDataSourceAwsTransferServer_ -timeout 180m
=== RUN   TestAccDataSourceAwsTransferServer_basic
=== PAUSE TestAccDataSourceAwsTransferServer_basic
=== RUN   TestAccDataSourceAwsTransferServer_service_managed
=== PAUSE TestAccDataSourceAwsTransferServer_service_managed
=== RUN   TestAccDataSourceAwsTransferServer_apigateway
=== PAUSE TestAccDataSourceAwsTransferServer_apigateway
=== RUN   TestAccAWSTransferServer_basic
=== PAUSE TestAccAWSTransferServer_basic
=== RUN   TestAccAWSTransferServer_securityPolicy
=== PAUSE TestAccAWSTransferServer_securityPolicy
=== RUN   TestAccAWSTransferServer_Vpc
=== PAUSE TestAccAWSTransferServer_Vpc
=== RUN   TestAccAWSTransferServer_apigateway
=== PAUSE TestAccAWSTransferServer_apigateway
=== RUN   TestAccAWSTransferServer_disappears
=== PAUSE TestAccAWSTransferServer_disappears
=== RUN   TestAccAWSTransferServer_forcedestroy
=== PAUSE TestAccAWSTransferServer_forcedestroy
=== RUN   TestAccAWSTransferServer_vpcEndpointId
=== PAUSE TestAccAWSTransferServer_vpcEndpointId
=== RUN   TestAccAWSTransferServer_hostKey
=== PAUSE TestAccAWSTransferServer_hostKey
=== CONT  TestAccDataSourceAwsTransferServer_basic
=== CONT  TestAccAWSTransferServer_apigateway
=== CONT  TestAccAWSTransferServer_forcedestroy
=== CONT  TestAccAWSTransferServer_vpcEndpointId
=== CONT  TestAccAWSTransferServer_hostKey
=== CONT  TestAccAWSTransferServer_disappears
=== CONT  TestAccAWSTransferServer_basic
=== CONT  TestAccAWSTransferServer_Vpc
=== CONT  TestAccAWSTransferServer_securityPolicy
=== CONT  TestAccDataSourceAwsTransferServer_service_managed
=== CONT  TestAccDataSourceAwsTransferServer_apigateway
=== CONT  TestAccAWSTransferServer_vpcEndpointId
    resource_aws_transfer_server_test.go:275: Step 1/2 error: Error running apply: exit status 1
        2021/05/05 17:36:36 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Account has the maximum allowed number of servers
        
          on terraform_plugin_test.tf line 66, in resource "aws_transfer_server" "test":
          66: resource "aws_transfer_server" "test" {
        
        
--- FAIL: TestAccAWSTransferServer_vpcEndpointId (53.88s)
--- PASS: TestAccAWSTransferServer_hostKey (186.34s)
--- PASS: TestAccDataSourceAwsTransferServer_basic (187.10s)
--- PASS: TestAccDataSourceAwsTransferServer_service_managed (187.74s)
--- PASS: TestAccAWSTransferServer_disappears (195.38s)
--- PASS: TestAccAWSTransferServer_forcedestroy (200.44s)
--- PASS: TestAccAWSTransferServer_securityPolicy (206.79s)
--- PASS: TestAccAWSTransferServer_basic (208.04s)
--- PASS: TestAccAWSTransferServer_Vpc (212.65s)
--- PASS: TestAccAWSTransferServer_apigateway (228.32s)
--- PASS: TestAccDataSourceAwsTransferServer_apigateway (320.99s)
FAIL
FAIL	github.com/terraform-providers/terraform-provider-aws/aws	323.987s
FAIL
make: *** [testacc] Error 1

=== CONT  TestAccAWSTransferServer_vpcEndpointId
--- PASS: TestAccAWSTransferServer_vpcEndpointId (106.52s)

The failure is account-specific and unrelated to this change.

GovCloud
% make testacc TEST=./aws TESTARGS='-run=TestAccAWSTransferServer_\|TestAccDataSourceAwsTransferServer_'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSTransferServer_\|TestAccDataSourceAwsTransferServer_ -timeout 180m
=== RUN   TestAccDataSourceAwsTransferServer_basic
=== PAUSE TestAccDataSourceAwsTransferServer_basic
=== RUN   TestAccDataSourceAwsTransferServer_service_managed
=== PAUSE TestAccDataSourceAwsTransferServer_service_managed
=== RUN   TestAccDataSourceAwsTransferServer_apigateway
=== PAUSE TestAccDataSourceAwsTransferServer_apigateway
=== RUN   TestAccAWSTransferServer_basic
=== PAUSE TestAccAWSTransferServer_basic
=== RUN   TestAccAWSTransferServer_securityPolicy
=== PAUSE TestAccAWSTransferServer_securityPolicy
=== RUN   TestAccAWSTransferServer_Vpc
=== PAUSE TestAccAWSTransferServer_Vpc
=== RUN   TestAccAWSTransferServer_apigateway
=== PAUSE TestAccAWSTransferServer_apigateway
=== RUN   TestAccAWSTransferServer_disappears
=== PAUSE TestAccAWSTransferServer_disappears
=== RUN   TestAccAWSTransferServer_forcedestroy
=== PAUSE TestAccAWSTransferServer_forcedestroy
=== RUN   TestAccAWSTransferServer_vpcEndpointId
    resource_aws_transfer_server_test.go:272: Transfer Server VPC_ENDPOINT endpoint type is not supported in GovCloud partition
--- SKIP: TestAccAWSTransferServer_vpcEndpointId (0.00s)
=== RUN   TestAccAWSTransferServer_hostKey
=== PAUSE TestAccAWSTransferServer_hostKey
=== CONT  TestAccDataSourceAwsTransferServer_basic
=== CONT  TestAccAWSTransferServer_apigateway
=== CONT  TestAccAWSTransferServer_hostKey
=== CONT  TestAccAWSTransferServer_securityPolicy
=== CONT  TestAccAWSTransferServer_disappears
=== CONT  TestAccAWSTransferServer_forcedestroy
=== CONT  TestAccAWSTransferServer_Vpc
=== CONT  TestAccDataSourceAwsTransferServer_apigateway
=== CONT  TestAccDataSourceAwsTransferServer_service_managed
=== CONT  TestAccAWSTransferServer_basic
=== CONT  TestAccAWSTransferServer_apigateway
    resource_aws_api_gateway_rest_api_test.go:1326: skipping test; Endpoint Configuration type EDGE is not supported in this partition (aws-us-gov)
--- SKIP: TestAccAWSTransferServer_apigateway (1.36s)
=== CONT  TestAccDataSourceAwsTransferServer_apigateway
    resource_aws_api_gateway_rest_api_test.go:1326: skipping test; Endpoint Configuration type EDGE is not supported in this partition (aws-us-gov)
--- SKIP: TestAccDataSourceAwsTransferServer_apigateway (1.81s)
=== CONT  TestAccAWSTransferServer_hostKey
    provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/05 17:36:18 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
          on terraform_plugin_test.tf line 2, in resource "aws_transfer_server" "test":
           2: resource "aws_transfer_server" "test" {
        
        
--- SKIP: TestAccAWSTransferServer_hostKey (7.65s)
=== CONT  TestAccAWSTransferServer_disappears
    provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/05 17:36:19 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
          on terraform_plugin_test.tf line 2, in resource "aws_transfer_server" "test":
           2: resource "aws_transfer_server" "test" {}
        
        
=== CONT  TestAccAWSTransferServer_basic
    provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/05 17:36:19 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
          on terraform_plugin_test.tf line 2, in resource "aws_transfer_server" "test":
           2: resource "aws_transfer_server" "test" {}
        
        
=== CONT  TestAccAWSTransferServer_securityPolicy
    provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/05 17:36:19 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
          on terraform_plugin_test.tf line 2, in resource "aws_transfer_server" "test":
           2: resource "aws_transfer_server" "test" {
        
        
--- SKIP: TestAccAWSTransferServer_disappears (8.01s)
--- SKIP: TestAccAWSTransferServer_basic (8.05s)
--- SKIP: TestAccAWSTransferServer_securityPolicy (8.12s)
=== CONT  TestAccDataSourceAwsTransferServer_basic
    provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/05 17:36:20 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
          on terraform_plugin_test.tf line 2, in resource "aws_transfer_server" "test":
           2: resource "aws_transfer_server" "test" {}
        
        
--- SKIP: TestAccDataSourceAwsTransferServer_basic (8.84s)
=== CONT  TestAccAWSTransferServer_forcedestroy
    provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/05 17:36:19 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
          on terraform_plugin_test.tf line 2, in resource "aws_transfer_server" "test":
           2: resource "aws_transfer_server" "test" {
        
        
=== CONT  TestAccDataSourceAwsTransferServer_service_managed
    provider_test.go:1072: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
        2021/05/05 17:36:20 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.3
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
          on terraform_plugin_test.tf line 42, in resource "aws_transfer_server" "test":
          42: resource "aws_transfer_server" "test" {
        
        
--- SKIP: TestAccAWSTransferServer_forcedestroy (13.30s)
--- SKIP: TestAccDataSourceAwsTransferServer_service_managed (14.37s)
--- PASS: TestAccAWSTransferServer_Vpc (202.81s)
PASS
ok  	github.com/terraform-providers/terraform-provider-aws/aws	205.861s

@ewbankkit ewbankkit removed their assignment May 5, 2021
@ewbankkit ewbankkit merged commit 4ddbbb3 into hashicorp:main May 5, 2021
@github-actions github-actions bot added this to the v3.39.0 milestone May 5, 2021
@ghost
Copy link

ghost commented May 7, 2021

This has been released in version 3.39.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!

@DrFaust92 DrFaust92 deleted the r/transfer_server_security_policy branch May 7, 2021 05:56
@github-actions
Copy link

github-actions bot commented Jun 7, 2021

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 Jun 7, 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. enhancement Requests to existing resources that expand the functionality or scope. service/transfer Issues and PRs that pertain to the transfer 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
2 participants