@@ -46,16 +46,21 @@ param(
4646 [ValidateSet (' Developer' , ' Premium' , ' StandardV2' , ' PremiumV2' )]
4747 [string ]$SkuName = ' StandardV2' ,
4848
49- [switch ]$Destroy
49+ [switch ]$Destroy ,
50+
51+ [ValidateSet (' trace' , ' debug' , ' info' , ' warn' , ' error' , ' silent' )]
52+ [string ]$LogLevel = ' info'
5053)
5154
5255$ErrorActionPreference = ' Stop'
56+ $maskingHelpers = Join-Path $PSScriptRoot ' Masking.Helpers.ps1'
57+ . $maskingHelpers
5358
5459# ---------------------------------------------------------------------------
5560# Destroy path
5661# ---------------------------------------------------------------------------
5762if ($Destroy ) {
58- Write-Host " 🗑️ Deleting resource group '$ResourceGroupName '..." - ForegroundColor Yellow
63+ Write-Host " 🗑️ Deleting resource group '$ ( Mask - Identifier - Value $ ResourceGroupName) '..." - ForegroundColor Yellow
5964 az group delete -- name $ResourceGroupName -- yes -- no- wait
6065 Write-Host " ✅ Deletion initiated (async). Resource group will be removed shortly." - ForegroundColor Green
6166 exit 0
@@ -78,7 +83,7 @@ if (-not $account) {
7883}
7984
8085$subscriptionId = $account.id
81- Write-Host " Subscription: $ ( $account.name ) ($subscriptionId )" - ForegroundColor Gray
86+ Write-Host " Subscription: $ ( $account.name ) ($ ( Mask - SubscriptionId - Value $ subscriptionId) )" - ForegroundColor Gray
8287
8388# Register required resource providers
8489Write-Host " 📋 Registering required resource providers..." - ForegroundColor Cyan
@@ -124,7 +129,7 @@ if (-not $allRegistered) {
124129Write-Host " ✅ Resource providers ready" - ForegroundColor Green
125130
126131# Create resource group if needed
127- Write-Host " 📦 Ensuring resource group '$ResourceGroupName ' exists in '$Location '..." - ForegroundColor Cyan
132+ Write-Host " 📦 Ensuring resource group '$ ( Mask - Identifier - Value $ ResourceGroupName) ' exists in '$Location '..." - ForegroundColor Cyan
128133az group create -- name $ResourceGroupName -- location $Location -- output none
129134
130135# Deploy Bicep template
@@ -158,10 +163,11 @@ Write-Host ""
158163Write-Host " APIOps CLI extract command:" - ForegroundColor Cyan
159164Write-Host " "
160165Write-Host " npx apiops extract \"
161- Write-Host " --subscription-id $ ( $outputs.subscriptionId.value ) \"
162- Write-Host " --resource-group $ ( $outputs.resourceGroupName.value ) \"
166+ Write-Host " --subscription-id $ ( Mask - SubscriptionId - Value $outputs.subscriptionId.value ) \"
167+ Write-Host " --resource-group $ ( Mask - Identifier - Value $outputs.resourceGroupName.value ) \"
163168Write-Host " --service-name $ ( $outputs.apimServiceName.value ) \"
164- Write-Host " --output-dir ./extracted"
169+ Write-Host " --output-dir ./extracted \"
170+ Write-Host " --log-level $LogLevel "
165171Write-Host " "
166172Write-Host " Gateway URL: $ ( $outputs.gatewayUrl.value ) " - ForegroundColor Gray
167173Write-Host " Workspace deployed: $ ( $outputs.workspaceDeployed.value ) " - ForegroundColor Gray
@@ -178,6 +184,7 @@ $outputObj = @{
178184 workspaceDeployed = $outputs.workspaceDeployed.value
179185 gatewayDeployed = $outputs.gatewayDeployed.value
180186 skuName = $outputs.skuName.value
187+ logLevel = $LogLevel
181188}
182189
183190# Write to GitHub Actions output if running in CI
0 commit comments