Closed troyready closed 6 years ago
One solution that we've come up with (credit to my colleague JR) is to add a new field to the package sources & stack definitions to indicate when/where template loading should be done relative to that package, e.g.:
package_sources:
git:
- uri: ssh://git@bitbucket..com/myorg/stacker-modules.git
template_package_name: mystackermodules
stacks:
mystack:
template_package_name: mystackermodules
template_path: cloudformation/ssm_parameter.yaml
In this case, because stack mystack
has a defined template_package_name, its template loading will be done relative to that downloaded package's directory.
Another route to go would be to just add some sort of option to the packages_sources
listings indicating that its path should be checked when raw templates are loaded.
In some ways, I like the simplicity of this, but it has more edge cases / preferences to work through (e.g. what order should be used when checking for file existence?)
"Remote" blueprints can be used because downloaded packages are added to the python syspath. Raw template cannot be accessed in this way.