Closed tobyscales closed 4 years ago
Thanks. The templates are optimized for portal deployment, and to be deployed using the URIs for the main - as well as the linked templates depending on your selection. Is there a reason why you want to deploy via cli for bootstrapping?
For completeness - here's how you would deploy the reference implementation using command-line:
New-AzTenantDeployment -Name
Describe the bug Referencing the deployment().templateLink.uri property only works if the template is being run from a repo URL (as happens when clicking Deploy to Azure). When the template repo is cloned and the deployment run locally, that property is missing so the deployment fails. I verified this problem exists with Wingtip, Contoso and AdventureWorks.
I have worked around this in my own templates by using a conditional variable like so:
"thisRepoUri": "[if(contains(deployment().properties, 'templateLink'), deployment().templateLink.uri, 'https://raw.githubusercontent.com/tescales/azure-letsencrypt/master')]"
Steps to reproduce
Screenshots