stack_master icon indicating copy to clipboard operation
stack_master copied to clipboard

template: value does not honour absolute paths

Open et304383 opened this issue 7 years ago • 4 comments

If I do something like this:

stack:
  us-east-1:
    stack-name:
      template: /absolute/path/to/template.yml

It will take the current directory (of stack_master.yml) and append /absolute/path/to/template.yml

et304383 avatar Feb 01 '18 15:02 et304383

Hey while you're digging into this would it be possible to make the 'templates' directory optional? I'd like to be able to just use the current directory as my template relative path and not have to symlink templates to the current directory for this to work.

et304383 avatar Feb 06 '18 18:02 et304383

What's the use case for using absolute paths vs. relative paths? Sorry I'm trying to understand what problem you're trying to solve as there may be a better solution.

patrobinson avatar Feb 06 '18 22:02 patrobinson

We have a directory with some logic that generates CFN templates to an output folder. We'd like to keep the stack master config file in this directory too so the templates would be relative to this location:

template: output/my_template.yml

... for example.

As far as absolute paths, this is a less likely scenario in the real world but when I was playing around with stack master at first I just wanted to reference a template from a random location on my machine and didn't expect to see the current directory prepended to the absolute path.

et304383 avatar Feb 07 '18 11:02 et304383

Stack Master is a little opinionated about how you should structure your directory. This I think helps people to avoid having to make a decision about where to put their templates and perhaps regret it later.

Relative paths do work from my experience, if there's a problem with them please file a new issue.

For absolute paths I'd be happy to support them if a PR is raised, but I don't consider this a current priority to fix given the reasons above.

Let me know if I can help any further.

patrobinson avatar Feb 08 '18 02:02 patrobinson