Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Pass pipeline vnet to live test arm templates
  • Loading branch information
benbp authored and azure-sdk committed Jun 17, 2024
commit 9e4db01408d4c60b9be4597d8da695711a4bcb54
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