Azure / template-specs

MIT License
31 stars 4 forks source link

Referencing deployments within deployments with relativePath is not documented well #18

Closed slavizh closed 4 years ago

slavizh commented 4 years ago

I have deployment like:

When you have to specify relativePath for template1.json in azuredeploy.json it looks like this: nestedtemplates/template1.json

When I have to specify relativePath for template2 in template1.json it looks like this: template2.json

Basically the relativePath value needs to be accordance to the path of the template which is the parent. This could be confusing. For me best approach relative path to always be from the root of your solution structure.

mumian commented 4 years ago

I just created a PR to address the issue.

mumian commented 4 years ago

The PR is merged.

alex-frankel commented 4 years ago

@slavizh we made the decision to make everything relative to the current file, as that is standard convention in most (if not all) modern programming languages. This is in contrast to the convention that has been established for linked templates. For that convention, we are considering adding a special character to reference the directory root (e.g. relative to the main template). It would look something like:

"relativePath": "#/artifacts/myTemplate.json"

Thoughts?

slavizh commented 4 years ago

@alex-frankel ok. As long as it is documented well should be ok.