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

Support passing User-Agent #9

Closed
radeksimko opened this issue Jun 26, 2020 · 2 comments · Fixed by #46
Closed

Support passing User-Agent #9

radeksimko opened this issue Jun 26, 2020 · 2 comments · Fixed by #46
Assignees
Labels
enhancement New feature or request

Comments

@radeksimko
Copy link
Member

Tools executing Terraform (such as Terraform Language Server) would benefit from measuring impact/usage and one way of doing it would be by appending an identifier to User-Agent by passing TF_APPEND_USER_AGENT which then enables filtering data from whatever upstream backend requests were sent to.

https://github.com/hashicorp/terraform-plugin-test/issues/22

I'm not sure if this should be a first-class config option, but I'm creating this issue to discuss whether it should.

@paultyng paultyng added the enhancement New feature or request label Jun 26, 2020
@kmoe kmoe self-assigned this Jul 13, 2020
@paultyng
Copy link
Contributor

paultyng commented Jul 19, 2020

I think this should be a first class option. We should probably just add a default value to the User-Agent with terraform-exec/v1.2.3 and append additionally to that if any value passed in the env var or manually.

This would result in 3 sources for the env var when passed down to the exec.Cmd:

  1. constant value of terraform-exec
  2. code supplied value via UserAgent option function
  3. env variable already specified in os.Environ (similar to checkpoint handling somewhat)

All 3 should be appended when passed down to the CLI.

@paultyng
Copy link
Contributor

paultyng commented Aug 7, 2020

May need to use #22 to get the version info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants