accelerator/pipeline-scripts/Deploy-ALZLoggingAndSentinelResourceGroup.ps1 (23 lines of code) (raw):

param ( [Parameter()] [String]$Location = "$($env:LOCATION)", [Parameter()] [String]$ManagementSubscriptionId = "$($env:MANAGEMENT_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\resourceGroupLoggingAndSentinel.parameters.all.json", [Parameter()] [Boolean]$WhatIfEnabled = [System.Convert]::ToBoolean($($env:IS_PULL_REQUEST)) ) # Parameters necessary for deployment $inputObject = @{ DeploymentName = -join ('alz-LoggingAndSentinelRGDeploy-{0}' -f (Get-Date -Format 'yyyyMMddTHHMMssffffZ'))[0..63] Location = $Location TemplateFile = $TemplateFile TemplateParameterFile = $TemplateParameterFile WhatIf = $WhatIfEnabled Verbose = $true } Select-AzSubscription -SubscriptionId $ManagementSubscriptionId New-AzSubscriptionDeployment @inputObject