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

Expose env vars as FCL variables #191

Closed
traut opened this issue May 27, 2024 · 0 comments · Fixed by #190
Closed

Expose env vars as FCL variables #191

traut opened this issue May 27, 2024 · 0 comments · Fixed by #190
Assignees
Labels
Milestone

Comments

@traut
Copy link
Member

traut commented May 27, 2024

Background

The function from_env_variable() we support currently allows template authors to load dynamic values from environment variables. While it is very useful, it lacks the flexibility we can achieve with FCL variables

Design

Expose env variables under env. namespace in FCL context, so it can be used with HCL attributes / templating

For example:

config data somesource {
  uril = "https://${env.SOMESOURCE_DOMAIN}/api"
  username = env.SOMESOURCE_USERNAME
  password = env.SOMESOURCE_PASSWORD
}

Also, from_env_variable() function should be retired

@traut traut added this to the v0.4 milestone May 27, 2024
@traut traut added the fcl label May 27, 2024
@traut traut mentioned this issue May 27, 2024
20 tasks
@Andrew-Morozko Andrew-Morozko linked a pull request May 27, 2024 that will close this issue
20 tasks
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