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

[feat] populate password for command output #156

Open
a1994sc opened this issue Jan 20, 2025 · 0 comments
Open

[feat] populate password for command output #156

a1994sc opened this issue Jan 20, 2025 · 0 comments

Comments

@a1994sc
Copy link

a1994sc commented Jan 20, 2025

I have a postgresql connection that I would like to look at, but it has a randomly generated password.

The config looks like this:

[[database]]
Name = 'cluster-coder'
Provider = 'postgres'
DBName = 'coder'
URL = 'postgres://postgres:<password>@localhost:${port}/coder?sslmode=disable'
Commands = [
  { Command = 'kubectl --context cluster port-forward -n coder svc/cluster-pooler ${port}:5432', WaitForPort = '${port}' }
]

It would be nice to be able to populate the <password> the same we do for ${port}.

Commands = [
  { Command = 'kubectl --context cluster get secrets blah | yq .data.password | base64 -d', <password identifier> },
  { Command = 'kubectl --context cluster port-forward -n coder svc/cluster-pooler ${port}:5432', WaitForPort = '${port}' }
]

I'm not sure what it should look like for <password identifier> to say I want the output of this command to be used as the password... this might be able to be extend to allow arbitrary variable substitution, but at least MVP for this issue would be able to populate the password dynamically.

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

1 participant