terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Added a User-Agent header for remote-state http backend client

Open NetMoose opened this issue 1 year ago • 2 comments

Added a User-Agent header for the http client to determine which client call to the http backend for change state.

Sometimes need to be able to send specially formatted state in different ways (for example, hiding sensitive data that will be shown in Swagger output but not hidden for terraform cli). In this case, would like to be able to identify which client sends the request for change state.

Target Release

1.8.x

Draft CHANGELOG entry

ENHANCEMENTS

  • When calling http-backend from terraform, "User-Agent" header does not change, which does not allow correctly identifying the type of connecting client. Changed "User-Agent" header from "Go-http-client/1.1" to "Terraform-http-client/1.1"

NetMoose avatar Feb 13 '24 04:02 NetMoose

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

hashicorp-cla avatar Feb 13 '24 04:02 hashicorp-cla

Thanks for this submission. Please sign the CLA per https://github.com/hashicorp/terraform/pull/34662#issuecomment-1940421282 and I will bring this to the triage meeting. Thanks!

crw avatar Feb 13 '24 22:02 crw