Enable using local filesystem for Linked Templates
Allow an ARM template to reference a relative file path on the local file system for accessing Linked Templates. It seems absurd that this isn't already available. We shouldn't be forced to put our templates in a publicly available resource to retrieve them and use them in other templates.
Alexander Batishchev commented
The most needed feature in the world of linked/nested templates!!
Seconds that as local file support has its advantage over online repo as there maybe a need of retaining json files on a local machine due to compliance and security requirement. Have tested suggestion from Michael however it's more applicable for devtest environment not local machine. Would be delighted to see this error message go away #Azure
The provided content link 'file:///E:/ps/arm/helloworld.json' is invalid or not supported. Content link must be an absolute URI not referencing local host or UNC path.
Only being able to reference a URL for the templatelink means I have to check in my code (template) changes *before* I can test them, which is untenable.
I'm sure it's difficult to achieve support for local files but it would be a significant improvement.
Couldn't agree more with this. While it is not specifically accurate that we are forced to put them in a publicly accessible location, the process for making that location private yet accessible (SAS tokens, etc.) is another complicated layer. Generate tokens, etc. where to keep these? can't check them in, so we need code to reference a key vault to get the token to reference the private storage to reach the templates.... yuck. I have to now design/build an entire system just to read the templates.
My templates are checked into source control, and I'm editing them right on my box. Let me run them from there. I can already run a single template from there, so there is no access/other security issue that should be blocking this.
If I want to later go through the effort to move everything to a cloud-based storage location, that should be up to me.
Torben Knerr commented
support for file:///c:/foo/template.json URI please! :)
Qiang Li commented
It will be a great feature if we can also package all required files/resources (e.g. in an archive format) so the template is self-contained.
Michael, that really isn't referencing a local template from a local template like Alex Marshall is suggesting though.
This already is available. At least, I'm able to reference my linked templates locally. Or, more accurately, I utilize the _artifactslocation variable to utilize a storage acct that only I have access to to host the templates while I deploy.