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

tests/transfer: InvalidRequestException Invalid Server Type PUBLIC (GovCloud) #15761

Closed
YakDriver opened this issue Oct 21, 2020 · 2 comments · Fixed by #15375
Closed

tests/transfer: InvalidRequestException Invalid Server Type PUBLIC (GovCloud) #15761

YakDriver opened this issue Oct 21, 2020 · 2 comments · Fixed by #15375
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/transfer Issues and PRs that pertain to the transfer service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Milestone

Comments

@YakDriver
Copy link
Member

YakDriver commented Oct 21, 2020

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue 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 issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

These tests fail on GovCloud:

--- FAIL: TestAccAWSTransferServer_basic (6.35s)
--- FAIL: TestAccAWSTransferServer_disappears (6.83s)
--- FAIL: TestAccAWSTransferServer_forcedestroy (11.26s)
--- FAIL: TestAccAWSTransferServer_hostKey (5.56s)
--- FAIL: TestAccAWSTransferServer_vpcEndpointId (30.43s)
--- FAIL: TestAccAWSTransferUser_basic (10.17s)
--- FAIL: TestAccAWSTransferUser_disappears (10.21s)
--- FAIL: TestAccAWSTransferUser_homeDirectoryMappings (9.40s)
--- FAIL: TestAccAWSTransferUser_modifyWithOptions (10.00s)
--- FAIL: TestAccDataSourceAwsTransferServer_basic (7.46s)
--- FAIL: TestAccDataSourceAwsTransferServer_basic (8.16s)
--- FAIL: TestAccDataSourceAwsTransferServer_service_managed (11.55s)
--- FAIL: TestAccDataSourceAwsTransferServer_service_managed (11.60s)

All with the same error: InvalidRequestException: Invalid server type: PUBLIC.

This would be another excellent place for skipping the test with the functionality in hashicorp/terraform-plugin-sdk#592.

New or Affected Resource(s)

  • resource/aws_transfer_user
  • data source/aws_transfer_server
  • resource/aws_transfer_server

Terraform Configuration Files

Example:

resource "aws_iam_role" "foo" {
  name = "tf-test-transfer-user-iam-role"

  assume_role_policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "transfer.amazonaws.com"
      },
      "Action": "sts:AssumeRole"
    }
  ]
}
EOF
}

resource "aws_iam_role_policy" "foo" {
  name = "tf-test-transfer-user-iam-policy"
  role = aws_iam_role.foo.id

  policy = <<POLICY
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowFullAccesstoS3",
      "Effect": "Allow",
      "Action": [
        "s3:*"
      ],
      "Resource": "*"
    }
  ]
}
POLICY
}

resource "aws_transfer_user" "foo" {
  server_id = aws_transfer_server.foo.id
  user_name = "tftestuser"
  role      = aws_iam_role.foo.arn
}

Debug Output

TestAccAWSTransferUser_disappears: resource_aws_transfer_user_test.go:112: Step 1/1 error: Error running apply: 2020/10/21 09:13:37 [DEBUG] Using modified User-Agent: Terraform/0.12.29 HashiCorp-terraform-exec/0.10.0
        
        Error: Error creating Transfer Server: InvalidRequestException: Invalid server type: PUBLIC
        
--- FAIL: TestAccAWSTransferUser_disappears (10.04s)

References

@YakDriver YakDriver added tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. partition/aws-us-gov Pertains to the aws-us-gov partition. labels Oct 21, 2020
@ghost ghost added service/iam Issues and PRs that pertain to the iam service. service/transfer Issues and PRs that pertain to the transfer service. labels Oct 21, 2020
@YakDriver YakDriver changed the title tests/provider: Transfer User InvalidRequestException (GovCloud) tests/transfer: Transfer InvalidRequestException (GovCloud) Dec 2, 2020
@YakDriver YakDriver changed the title tests/transfer: Transfer InvalidRequestException (GovCloud) tests/transfer: InvalidRequestException Invalid Server Type PUBLIC (GovCloud) Dec 2, 2020
@ewbankkit ewbankkit removed the service/iam Issues and PRs that pertain to the iam service. label 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!

@github-actions
Copy link

github-actions bot commented Jun 6, 2021

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 have found a problem that seems similar to this, 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 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
partition/aws-us-gov Pertains to the aws-us-gov partition. service/transfer Issues and PRs that pertain to the transfer service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants