cockroachdb / terraform-provider-cockroach

Terraform provider for CockroachDB Cloud
Apache License 2.0
56 stars 10 forks source link

Added user-agent in the API calls #22

Closed abhishekdwivedi3060 closed 2 years ago

abhishekdwivedi3060 commented 2 years ago

Add a description of the problem this PR addresses and an overview of how this PR works.

Checklist

marksoper commented 2 years ago

@abhishekdwivedi3060 How does this relate to the Go SDK? The Go SDK will attach its own User Agent, right?

abhishekdwivedi3060 commented 2 years ago

@abhishekdwivedi3060 How does this relate to the Go SDK? The Go SDK will attach its own User Agent, right?

Go SDK at the moment has it's own User-agent something called ccloud-cli/1.0.0 which we need to fix. This Go-SDK user-agent is defined in default SDK configuration, but here we are explicitly setting the user-agent, so that will be forwarded in all subsequent requests.

All the consumers of Go-SDK will have to set the User-agent explicitly because Go-SDK is a generic module