Skip to content

Commit

Permalink
Pass pipeline vnet to live test arm templates (#1811)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Broderick Phillips <[email protected]>
  • Loading branch information
azure-sdk and benbp authored Jun 17, 2024
1 parent ff21b53 commit b7d4e57
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ param (

. $PSScriptRoot/SubConfig-Helpers.ps1

$azsdkPipelineVnet = "/subscriptions/a18897a6-7e44-457d-9260-f2854c0aca42/resourceGroups/azsdk-pools/providers/Microsoft.Network/virtualNetworks/azsdk-pipeline-vnet-wus"
$azsdkPipelineSubnets = @(
($azsdkPipelineVnet + "/subnets/pipeline-subnet-ubuntu-1804-general"),
($azsdkPipelineVnet + "/subnets/pipeline-subnet-ubuntu-2004-general"),
($azsdkPipelineVnet + "/subnets/pipeline-subnet-ubuntu-2204-general"),
($azsdkPipelineVnet + "/subnets/pipeline-subnet-win-2019-general"),
($azsdkPipelineVnet + "/subnets/pipeline-subnet-win-2022-general")
)

if (!$ServicePrincipalAuth) {
# Clear secrets if not using Service Principal auth. This prevents secrets
# from being passed to pre- and post-scripts.
Expand Down Expand Up @@ -743,13 +752,15 @@ try {
if ($ProvisionerApplicationOid) {
$templateParameters["provisionerApplicationOid"] = "$ProvisionerApplicationOid"
}

if ($TenantId) {
$templateParameters.Add('tenantId', $TenantId)
}
if ($TestApplicationSecret -and $ServicePrincipalAuth) {
$templateParameters.Add('testApplicationSecret', $TestApplicationSecret)
}
if ($CI -and $Environment -eq 'AzureCloud') {
$templateParameters.Add('azsdkPipelineSubnetList', $azsdkPipelineSubnets)
}

$defaultCloudParameters = LoadCloudConfig $Environment
MergeHashes $defaultCloudParameters $(Get-Variable templateParameters)
Expand Down

0 comments on commit b7d4e57

Please sign in to comment.