Functions/New-ARMTemplate.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
function New-ARMTemplate { [cmdletbinding()] Param( $schema = "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#" , [switch]$Passthru ) $templateObject = [pscustomobject][ordered]@{ '$schema' = $schema contentVersion = "1.0.0.0" parameters = [pscustomobject]@{} variables = [pscustomobject]@{} resources = @() outputs = [pscustomobject]@{} } if ($script:Template) { $script:Template = $templateObject } if ($Passthru.IsPresent) { $templateObject } } |