ALZ-Bicep/accelerator/pipeline-scripts/Deploy-ALZConnectivityResou...

31 строка
1.0 KiB
PowerShell

param (
[Parameter()]
[String]$Location = "$($env:LOCATION)",
[Parameter()]
[String]$ConnectivitySubscriptionId = "$($env:CONNECTIVITY_SUBSCRIPTION_ID)",
[Parameter()]
[String]$TemplateFile = "upstream-releases\$($env:UPSTREAM_RELEASE_VERSION)\infra-as-code\bicep\modules\resourceGroup\resourceGroup.bicep",
[Parameter()]
[String]$TemplateParameterFile = "config\custom-parameters\resourceGroupConnectivity.parameters.all.json",
[Parameter()]
[Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST))
)
# Parameters necessary for deployment
$inputObject = @{
DeploymentName = -join ('alz-ConnectivityRGDeploy-{0}' -f (Get-Date -Format 'yyyyMMddTHHMMssffffZ'))[0..63]
Location = $Location
TemplateFile = $TemplateFile
TemplateParameterFile = $TemplateParameterFile
WhatIf = $WhatIfEnabled
Verbose = $true
}
Select-AzSubscription -SubscriptionId $ConnectivitySubscriptionId
New-AzSubscriptionDeployment @inputObject