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

base64Encode doesn't expand variables #2411

Closed
failshell opened this issue May 26, 2021 · 0 comments · Fixed by #2726
Closed

base64Encode doesn't expand variables #2411

failshell opened this issue May 26, 2021 · 0 comments · Fixed by #2726
Labels

Comments

@failshell
Copy link

Bug

Current Behavior

if you use something like ${base64Encode("mongodb+srv://user:${secrets.mongodb-user-password}@mongodb-headless.${var.kubernetes.namespace}.svc.cluster.local/?ssl=false&replicaSet=rs0&authSource=db")} to encode a string, the variables in between the double quotes won't be expanded. you're going to end up with the litteral string.

Expected behavior

variables should be expanded to their proper values.

Workaround

i've set a variable with "mongodb+srv://user:${secrets.mongodb-user-password}@mongodb-headless.${var.kubernetes.namespace}.svc.cluster.local/?ssl=false&replicaSet=rs0&authSource=db" as a value and used that variable like so ${base64Encode(var.example.mongoDBConnectionString)} and i ended up with the proper string.

Your environment

garden version: 0.12.21
os: macOS

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

Successfully merging a pull request may close this issue.

2 participants