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

Support macros also in normal service apply rules. #1453

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pprkut
Copy link
Contributor

@pprkut pprkut commented Mar 29, 2018

I have a service apply rule where I'd like the service name to include a host specific variable. I saw that working for "apply Service for" rules, but for normal "apply Service" rules it wasn't.

Example rendered config:

apply Service "dns test.api.$host.vars.domain$" {
    name = "dns test.api." + host.vars.domain
    import "domain"

    assign where host.vars.environment == "test"

    import DirectorOverrideTemplate
}

I tried adjusting the unit tests for this, but it's a bit difficult to get started with those locally. Crossing my fingers they work :)

@pprkut pprkut force-pushed the service_name_macro branch from eac0600 to 130f9e2 Compare March 29, 2018 12:18
@pprkut
Copy link
Contributor Author

pprkut commented Mar 29, 2018

This should also take care of some of the use-cases mentioned in #608

@SMillerDev
Copy link

@Thomas-Gelf any opinions on this?

@pprkut
Copy link
Contributor Author

pprkut commented Jul 4, 2019

Ping. Any update on this? We've been using it in our setup for more than a year now and it works without issues

@SMillerDev
Copy link

Oh no, we missed the option to tell people that this has been tested in production for 2 years now. Oh well...

@log1-c
Copy link

log1-c commented Jun 24, 2021

I would also like to see this feature implemented.
Any chance this can be added to a upcoming/the next release? @Thomas-Gelf @lazyfrosch

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

Successfully merging this pull request may close these issues.

3 participants