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

Feature Request: Read API key (application_secret) from an environment variable #10

Open
kinghuang opened this issue Jul 19, 2024 · 1 comment

Comments

@kinghuang
Copy link

It would like to set application_secret provider config via an environment variable. The docs already make use of CRUNCHY_API_KEY in the examples.

Terraform variables and TF_VAR_* environment variables can be used as a workaround.

@wilybrace
Copy link
Collaborator

The doc you referenced is for the Crunchy Bridge API and are referring to how someone might set an environment variable to be compatible with the curl examples used to demonstrate direct use of the API. Those examples don't really influence the function of the Terraform provider. (Some of the Terraform-specific documentation has been duplicated in the Crunchy Bridge documentation for visibility, but the Terraform registry contains the complete documentation for the provider)

As far as I'm aware, using TF_VAR_* approach isn't a workaround, it is the built-in mechanism in Terraform for configuring via the environment. It saves unnecessary duplication of custom-implementing environment variable reads on a per-provider basis and also avoids having to establish precedence rules resolving conflicts between the built-in TF_VAR mechanism and a provider custom one.

So that I can understand your use case better - what benefit are you hoping to achieve with a parallel and seemingly redundant implementation of environment variable reads?

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

No branches or pull requests

2 participants