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: string interpolation #297

Open
shawalli opened this issue Mar 2, 2023 · 0 comments
Open

Feature request: string interpolation #297

shawalli opened this issue Mar 2, 2023 · 0 comments

Comments

@shawalli
Copy link

shawalli commented Mar 2, 2023

Many languages support some form of string interpolation. Adding string interpolation to YAML would enhance anchors/aliases. Below is a contrived example. Obviously the interpolation markers may not work, but this is just to give an idea.

user: &user john

cname: "{{ *user }}.somesite.com"
host: "{{ *user }}.ec2.somecompany"
shared-dir: "/some/shared/path/{{ *host }}"

In this example, user is interpolated into cname and hostname, andhost is interpolated into shared-dir, resulting in:

user: john

cname: "john.somesite.com"
host: "john.ec2.somecompany"
shared-dir: "/some/shared/path/john.ec2.somecompany"

Not sure if this is the right place to request new features for the spec, so let me know if I should post elsewhere.

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