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

storagegateway_gateway - error after apply was successful #19163

Closed
cjbeckwith opened this issue Apr 29, 2021 · 7 comments
Closed

storagegateway_gateway - error after apply was successful #19163

cjbeckwith opened this issue Apr 29, 2021 · 7 comments
Labels
bug Addresses a defect in current functionality. service/storagegateway Issues and PRs that pertain to the storagegateway service.

Comments

@cjbeckwith
Copy link

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

Terraform CLI and Terraform AWS Provider Version

Running TFE
Terraform v0.14.10

  • provider registry.terraform.io/hashicorp/archive v2.1.0
  • provider registry.terraform.io/hashicorp/aws v3.37.0

Affected Resource(s)

aws_storagegateway_gateway for type FILE_S3

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
NOTE: This was deployed a few weeks ago without issue. Now that we are adding additional configuration to the workspace, this error occurred when we ran a plan on the workspace:
Error: error reading Storage Gateway Bandwidth rate limit: InvalidGatewayRequestException: This operation is not valid for the specified gateway.
{
RespMetadata: {
StatusCode: 400,
RequestID: "41581b23-fec2-4242-82e5-ccb916dfbd2a"
},
Error_: {
ErrorCode: "UnsupportedOperationForGatewayType"
},
Message_: "This operation is not valid for the specified gateway."
}

resource "aws_storagegateway_gateway" "storage_gateway" {
  gateway_ip_address            = var.ip_address
  gateway_name                  = var.machine_name
  gateway_timezone              = var.timezone
  gateway_type                  = "FILE_S3"
  cloudwatch_log_group_arn      = local.cw_log_group_arn
  smb_security_strategy         = var.smb_security_strategy
  smb_file_share_visibility     = var.smb_file_share_visibility
  smb_active_directory_settings {
    domain_name        = var.domain_name
    username           = var.domain_username
    password           = var.domain_password
    timeout_in_seconds = var.timeout_in_seconds
  }

  lifecycle {
    ignore_changes = [gateway_ip_address]
  }

  tags = merge(var.tags,
    {
      "Name" = var.solution_name
  })
}

Debug Output

2021-04-29T19:03:00.874Z [INFO] plugin.terraform-provider-aws_v3.37.0_x5: 2021/04/29 19:03:00 [DEBUG] [aws-sdk-go] DEBUG: Response storagegateway/DescribeBandwidthRateLimit Details:
---[ RESPONSE ]--------------------------------------
HTTP/1.1 400 Bad Request
Connection: close
Content-Length: 169
Content-Type: application/x-amz-json-1.1
Date: Thu, 29 Apr 2021 19:03:00 GMT
X-Amzn-Requestid: 2f856cb1-aa52-4d25-99bb-bea398b564d2

-----------------------------------------------------: timestamp=2021-04-29T19:03:00.874Z
2021-04-29T19:03:00.874Z [INFO] plugin.terraform-provider-aws_v3.37.0_x5: 2021/04/29 19:03:00 [DEBUG] [aws-sdk-go] {"type":"InvalidGatewayRequestException","error":{"errorCode":"UnsupportedOperationForGatewayType"},"message":"This operation is not valid for the specified gateway."}: timestamp=2021-04-29T19:03:00.874Z
2021-04-29T19:03:00.874Z [INFO] plugin.terraform-provider-aws_v3.37.0_x5: 2021/04/29 19:03:00 [DEBUG] [aws-sdk-go] DEBUG: Validate Response storagegateway/DescribeBandwidthRateLimit failed, attempt 0/25, error InvalidGatewayRequestException: This operation is not valid for the specified gateway.
{
RespMetadata: {
StatusCode: 400,
RequestID: "2f856cb1-aa52-4d25-99bb-bea398b564d2"
},
Error
: {
ErrorCode: "UnsupportedOperationForGatewayType"
},
Message
: "This operation is not valid for the specified gateway."
}: timestamp=2021-04-29T19:03:00.874Z

Expected Behavior

No changes so should have planned out with no changes.

Actual Behavior

Errored with the following:
Error: error reading Storage Gateway Bandwidth rate limit: InvalidGatewayRequestException: This operation is not valid for the specified gateway.
{
RespMetadata: {
StatusCode: 400,
RequestID: "41581b23-fec2-4242-82e5-ccb916dfbd2a"
},
Error_: {
ErrorCode: "UnsupportedOperationForGatewayType"
},
Message_: "This operation is not valid for the specified gateway."
}

Steps to Reproduce

Ran plan on the workspace

Important Factoids

Nothing out of the ordinary

@ghost ghost added the service/storagegateway Issues and PRs that pertain to the storagegateway service. label Apr 29, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 29, 2021
@DrFaust92
Copy link
Collaborator

This seems to be addressed in the upcoming release by #19116

@ewbankkit ewbankkit added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 29, 2021
@ewbankkit
Copy link
Contributor

@cjbeckwith Thanks for raising this issue.
It has already been noticed in #19111. I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue.
Please add any additional comments there.

@cjbeckwith
Copy link
Author

Thanks all. Much appreciated...

@rnebular
Copy link

This is closed, but the issue persists with the aws provider reporting invalid operation for FILE_S3 gateway types, where previously plan/apply worked fine.

@cjbeckwith
Copy link
Author

@rnebular - Appears that the "fix" is coming in v 3.38 provider. Waiting on release... #19116 and #19111 I believe are addressing this issue...

@rnebular
Copy link

Oh, I got a little ahead of myself, eh? Thanks @cjbeckwith !

@github-actions
Copy link

github-actions bot commented Jun 1, 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 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/storagegateway Issues and PRs that pertain to the storagegateway service.
Projects
None yet
Development

No branches or pull requests

4 participants