File tree Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Expand file tree Collapse file tree 2 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ Start-Sleep -s 45
5252$az_version = az version
5353Write-Host " Azure CLI version: $az_version "
5454az cloud set -- name $Environment
55- az login -- service- principal - u $TestApplicationId -- tenant $TenantId -- allow- no- subscriptions -- federated- token $env: ARM_OIDC_TOKEN
55+ if ($CI ) {
56+ az login -- service- principal - u $TestApplicationId -- tenant $TenantId -- allow- no- subscriptions -- federated- token $env: ARM_OIDC_TOKEN
57+ }
5658az account set -- subscription $SubscriptionId
5759$versions = az aks get-versions - l $Location - o json | ConvertFrom-Json
5860Write-Host " AKS versions for ${Location} : $ ( $versions | ConvertTo-Json - Depth 100 ) "
Original file line number Diff line number Diff line change @@ -337,7 +337,18 @@ resource kubernetesCluster 'Microsoft.ContainerService/managedClusters@2023-06-0
337337 }
338338}
339339
340- resource vnet 'Microsoft.Network/virtualNetworks@2021-02-01' = if (provisionLiveResources ) {
340+ resource publicIP 'Microsoft.Network/publicIPAddresses@2023-05-01' = if (provisionLiveResources ) {
341+ name : '${baseName }PublicIP'
342+ location : location
343+ sku : {
344+ name : 'Standard'
345+ }
346+ properties : {
347+ publicIPAllocationMethod : 'Static'
348+ }
349+ }
350+
351+ resource vnet 'Microsoft.Network/virtualNetworks@2024-07-01' = if (provisionLiveResources ) {
341352 name : '${baseName }vnet'
342353 location : location
343354 properties : {
@@ -351,13 +362,14 @@ resource vnet 'Microsoft.Network/virtualNetworks@2021-02-01' = if (provisionLive
351362 name : '${baseName }subnet'
352363 properties : {
353364 addressPrefix : '10.0.0.0/24'
365+ defaultOutboundAccess : false
354366 }
355367 }
356368 ]
357369 }
358370}
359371
360- resource networkInterface 'Microsoft.Network/networkInterfaces@2021-02 -01' = if (provisionLiveResources ) {
372+ resource networkInterface 'Microsoft.Network/networkInterfaces@2024-07 -01' = if (provisionLiveResources ) {
361373 name : '${baseName }NIC'
362374 location : location
363375 properties : {
@@ -369,13 +381,16 @@ resource networkInterface 'Microsoft.Network/networkInterfaces@2021-02-01' = if
369381 subnet : {
370382 id : provisionLiveResources ? vnet .properties .subnets [0 ].id : ''
371383 }
384+ publicIPAddress : {
385+ id : provisionLiveResources ? publicIP .id : ''
386+ }
372387 }
373388 }
374389 ]
375390 }
376391}
377392
378- resource virtualMachine 'Microsoft.Compute/virtualMachines@2020-06 -01' = if (provisionLiveResources ) {
393+ resource virtualMachine 'Microsoft.Compute/virtualMachines@2024-07 -01' = if (provisionLiveResources ) {
379394 name : '${baseName }vm'
380395 location : location
381396 identity : {
You can’t perform that action at this time.
0 commit comments