Skip to content

Merging datasource with optional file #1129

Answered by hairyhenderson
m4rcs asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @m4rcs, thanks for posting with all this detail!

I'm trying to merge default config files with optional config overrides like in the example. But I can't figure it out.

Are you referring to your example? Or was there some other example or documentation that implies that it's possible to refer to a missing file? Datasources require valid URLs that refer to an existing resource.

Here's what I got when I ran the command:

$ gomplate --config ./gomplate.yml
08:59:06 ERR  error="template: templates/config.yml.tpl:4:13: executing \"templates/config.yml.tpl\" at <ds \"database\">: error calling ds: Couldn't read datasource 'database': Couldn't read datasource './config/database.yml': Can't s…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@m4rcs
Comment options

@hairyhenderson
Comment options

Answer selected by hairyhenderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants