File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Combined Azure Arc Evaluation and Onboarding Script
22# Parameters are injected by Terraform via azurerm_virtual_machine_run_command
3- # parameter / protected_parameter blocks — no string interpolation in script text.
3+ # parameter / protected_parameter blocks - no string interpolation in script text.
44param (
55 [string ]$SubscriptionId ,
66 [string ]$TenantId ,
7979 try {
8080 $null = Invoke-RestMethod - Headers @ {' Metadata' = ' true' } - Method GET `
8181 - Uri ' http://169.254.169.254/metadata/instance?api-version=2021-02-01' - TimeoutSec 5 - ErrorAction Stop # gitleaks:allow
82- Write-Log " WARNING: IMDS is still accessible — Arc onboarding may fail." " WARNING"
82+ Write-Log " WARNING: IMDS is still accessible - Arc onboarding may fail." " WARNING"
8383 } catch {
8484 Write-Log " IMDS is blocked as expected" " SUCCESS"
8585 }
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments