terraform-provider-aws: transport connection broken: too many transfer encodings["chunked" "chunked"]

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

$ terraform -v
Terraform v0.14.4
+ provider registry.terraform.io/hashicorp/aws v3.22.0

Affected Resource(s)

  • aws_db_proxy

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "aws_db_proxy" "my_proxy" {
  name                   = "my-proxy"
  debug_logging          = true
  engine_family          = "MYSQL"
  idle_client_timeout    = 1800
  require_tls            = false
  role_arn               = var.role_arn
  vpc_security_group_ids = var.proxy_security_group_ids
  vpc_subnet_ids         = var.db_subnet_ids
  auth {
    auth_scheme = "SECRETS"
    description = "example"
    iam_auth    = "DISABLED"
    secret_arn  = var.secret_arn
  }
}

Debug Output

https://gist.github.com/m-wynn/87aa1417f17ad36b1b165f70678c6874 The important part is 2021-01-07T12:03:25.362-0800 [DEBUG] plugin.terraform-provider-aws_v3.22.0_x5: caused by: Post "https://rds.us-east-1.amazonaws.com/": net/http: HTTP/1.x transport connection broken: too many transfer encodings: ["chunked" "chunked"]

Expected Behavior

The resource should be read. I can easily read this resource with aws-cli, e.g. aws rds describe-db-proxies --db-proxy-name my-proxy

Actual Behavior

The module hangs on trying to describe DB Proxies

Steps to Reproduce

I am unable to find the exact steps that led to the encodings being [“chunked” “chunked”]

—>

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 28
  • Comments: 23 (6 by maintainers)

Most upvoted comments

same in west-us-2, reverted to 3.21.0 per @bgaillard above would be good to get an authoritative response on a plan to fix this issue, as were quite a way behind with this version…

Hey all, I have chatted to AWS Support about this and they have informed me that they have fixed this.

I have checked it on my end and I can now create an RDS Proxy via terraform using multiple auth blocks.

This morning I noticed that the error only happens on the latest versions of the terraform-provider-aws (3.22 and 3.23). I was unable to reproduce it with 3.20 and 3.21.

Briefly, this behavior is reproducible with our acceptance testing against us-west-2:

=== CONT  TestAccAWSDBProxy_basic
resource_aws_db_proxy_test.go:480: unexpected PreCheck error: RequestError: send request failed
caused by: Post "https://rds.us-west-2.amazonaws.com/": net/http: HTTP/1.x transport connection broken: too many transfer encodings: ["chunked" "chunked"]
--- FAIL: TestAccAWSDBProxy_basic (3096.76s)

Here’s the debug logging from the first invocation there:

2021/01/07 07:18:47 [DEBUG] [aws-sdk-go] DEBUG: Request rds/DescribeDBProxies Details:
---[ REQUEST POST-SIGN ]-----------------------------
POST / HTTP/1.1
Host: rds.us-west-2.amazonaws.com
User-Agent: aws-sdk-go/1.36.19 (go1.15.5; linux; amd64) APN/1.0 HashiCorp/1.0 Terraform/0.11+compatible (+https://www.terraform.io)
Content-Length: 43
Authorization: AWS4-HMAC-SHA256 Credential=AKIAS--OMITTED--/20210107/us-west-2/rds/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=--OMITTED--
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-Amz-Date: 20210107T071847Z
Accept-Encoding: gzip

Action=DescribeDBProxies&Version=2014-10-31
-----------------------------------------------------
2021/01/07 07:18:47 [DEBUG] [aws-sdk-go] DEBUG: Send Request rds/DescribeDBProxies failed, attempt 0/25, error RequestError: send request failed
caused by: Post "https://rds.us-west-2.amazonaws.com/": net/http: HTTP/1.x transport connection broken: too many transfer encodings: ["chunked" "chunked"]
2021/01/07 07:18:47 [DEBUG] [aws-sdk-go] DEBUG: Retrying Request rds/DescribeDBProxies, attempt 1

We don’t do anything special in the aws_db_proxy resource as compared to other resources with regards to initializing or calling the AWS Go SDK receiver methods, and this has previously worked fine, so it may either be:

  • An issue with this particular AWS API after an API update
  • An issue that actually exists for all AWS Go SDK calls through the Terraform AWS Provider, but other AWS APIs ignore it and this API’s update now catches it