Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Created August 5, 2016 09:41
Show Gist options
  • Save justinyoo/1269ceb6f173803325b3f28ef3514370 to your computer and use it in GitHub Desktop.
Save justinyoo/1269ceb6f173803325b3f28ef3514370 to your computer and use it in GitHub Desktop.
Passing Parameters to Linked ARM Templates
$projectName = "[TEMPLATE_PROJECT_NAME]"
$resourceGroupName = "[RESOURCE_GROUP_NAME]"
$storageAccountName = "[STORAGE_ACCOUNT_NAME]"
$containerName = "[CONTAINER_NAME]"
Set-AzureRmCurrentStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName
$templates = Get-ChildItem .\src\$projectName\Templates\*.json -Exclude ("base-*.json", "master-*.json", "*.params.json")
foreach($template in $templates)
{
$filePath = $template.FullName
Set-AzureStorageBlobContent -Container $containerName -File $filePath -Force
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment