Skip to content

[FEATURE] Add support for extra user agent through environment variable #850

@osoucy

Description

@osoucy

Problem Statement
I want to append user agent information when deploying resources through Terraform (and Pulumi) Databricks provider without having to re-implement the provider. This would be required to support a partner integration and properly track relevant metrics.

Proposed Solution
Given that the terraform databricks provider uses the databricks-sdk-go user agent to define the user agent value sent to the Databricks REST API calls, adding support for an environment variable would eliminate the need for re-implementation anytime a new UserAgent value is required.

A similar implementation has already been done in the python sdk here by @nfx and @kartikgupta-db. Adding the same logic to the go sdk would resolve the stated problem.

Another, less generic, option would be to add okube-laktory to the list of official CI/CD providers defined here

Additional Context
Most terraform providers support an environment variable called TF_APPEND_USER_AGENT as described here. Unfortunately, the Terraform Databricks Provider has its own custom implementation of the user agent which prevent from using this environment variable. If I wanted to add okube-laktory to the user agent, I would have to implement custom Terraform and Pulumi Databricks providers (I need to support both). Obviously, this is quite effort-intensive and cumbersome just for the sake of adding a property to the user agent.

Another option would be to force all calls to go through a proxy which updates the headers of the API calls, but that would be a less than stellar user experience and requires to support a live service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions