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

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