Skip to content

Commit

Permalink
Add well known tenant IDs and TME status (#32914)
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 Mar 6, 2025
1 parent 02a22e3 commit a0c30da
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ param (
. $PSScriptRoot/TestResources-Helpers.ps1
. $PSScriptRoot/SubConfig-Helpers.ps1

$wellKnownTMETenants = @('70a036f6-8e4d-4615-bad6-149c02e7720d')

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 @@ -527,8 +529,11 @@ try {
if ($CI -and $Environment -eq 'AzureCloud' -and $env:PoolSubnet) {
$templateParameters.Add('azsdkPipelineSubnetList', @($env:PoolSubnet))
}
# Some arm/bicep templates may want to change deployment settings (e.g. local auth) in sandboxed TME tenants
$templateParameters.Add('supportsSafeSecretStandard', ($context.Tenant.Name -notlike '*TME*'))
# The TME tenants are our place for local auth testing so we do not support safe secret standard there.
# Some arm/bicep templates may want to change deployment settings like local auth in sandboxed TME tenants.
# The pipeline account context does not have the .Tenant.Name property, so check against subscription via
# naming convention instead.
$templateParameters.Add('supportsSafeSecretStandard', ($wellKnownTMETenants.Contains($TenantId)))

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

0 comments on commit a0c30da

Please sign in to comment.