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

Unable to run deploy with an inline Consul template #1

Closed
pmcatominey opened this issue Sep 21, 2017 · 4 comments
Closed

Unable to run deploy with an inline Consul template #1

pmcatominey opened this issue Sep 21, 2017 · 4 comments
Assignees

Comments

@pmcatominey
Copy link
Contributor

The template block below fails to render as a template:

template {
    data = <<EOH
APP_ENV={{ key "config/app/env" }}
APP_DEBUG={{ key "config/app/debug" }}
APP_KEY={{ secret "secret/key" }}
APP_URL={{ key "config/app/url" }}
EOH
    destination   = "core/.env"
    change_mode   = "noop"
}

[ERROR] levant/command: template: jobTemplate:26: function "key" not defined

Not sure what the best solution is, providing an option to disable templating for those only interested in deployment monitoring?

@jrasell
Copy link
Member

jrasell commented Sep 21, 2017

Hey @pmcatominey thanks for raising the issue; its something that hadn't even crossed my mind but that should certainly be handled. Disabling templating would be a fairly easy solution to implement so I might certainly go with that actually. I am flying back from HashiConf today, so I will do some investigation on the flight and hopefully have at least a workaround for you tomorrow. Thanks again for the feedback, its most helpful.

@pmcatominey
Copy link
Contributor Author

@jrasell no problem!

I think it would be beneficial to keep the number of options in levant low where possible so I'm happy with disabling the template feature.

I guess we could add a note to the README directing users who wish to use both templating and consul templates that they would need to either:

  • escape every delimiter in an inline consul-template
  • set the delimiter options of the template stanza
  • use a variable file to inject the consul-template source into the job file

@ygersie
Copy link
Contributor

ygersie commented Sep 21, 2017

Hi @jrasell Yorick here from Hashiconf ;) Looking good this project!

Wrt this issue, I think it would make more sense to choose a different Go template delimiter for this project? Would be a waste to keep having conflicts in the future, especially for people who'd like to use both Consul templating and levant templating.

@jrasell
Copy link
Member

jrasell commented Sep 21, 2017

hey @dropje86 I completely agree with that sentiment and will look into changing that asap.

@jrasell jrasell closed this as completed Sep 22, 2017
jrasell pushed a commit that referenced this issue Mar 4, 2021
…instructions

Update levant version in install instructions
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

3 participants