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

Please add a way to pull the API key from a locals value #12

Open
qops1981 opened this issue May 8, 2023 · 2 comments
Open

Please add a way to pull the API key from a locals value #12

qops1981 opened this issue May 8, 2023 · 2 comments
Assignees

Comments

@qops1981
Copy link

qops1981 commented May 8, 2023

Is your feature request related to a problem? Please describe.
When we run our terraform for Refinery, we have multiple environments. Each environment has it's own corresponding API key for Honeycomb. Every time I change the environment I would need to re-export the API key to match. If I use a tfvars file I need to call it in the commands in addition to switching the environment. This could also be confusing as I could not guarantee other callers would call the right tfvars file in combination with the correct environment.

Describe the solution you'd like
I would like to be able to pass the value to the Module as a module variable. This feels more direct to what the modules needs. Additionally; I can then store the API keys in a local file ( not committed to the repo via .gitignore ) and pull the value I need like so:

jsondecode(file("${path.module}/.honeycomb.keys.json"))[terraform.workspace]

This would limit the complexity down to the creation of 1 json file with associated keys and the need to select the terraform environment. Subsequent runs would only then require the terraform environment selection.

@qops1981
Copy link
Author

qops1981 commented May 8, 2023

Actually, if I could provide this value to the module I could also use an AWS secret

@tdarwin tdarwin self-assigned this May 17, 2023
@tdarwin
Copy link
Contributor

tdarwin commented May 17, 2023

@qops1981 I've seen this request from a couple of sources. I've got some revisions in the pipeline for this starter pack to make some improvements. I'll see if I can't figure a good way to do this as well. Might be a couple/few weeks out yet, but I'll make sure this is on the list for my work.

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