Skip to content

Commit 444eddd

Browse files
dantedallagmsJinLeiLei Jin
authored
Implemention of AuxTenant parameter in New-AzResourceGroupDeployment. (Azure#24088)
* Implemention of AuxTenant parameter in New-AzResourceGroupDeployment. Allows cmdlet to work with deployments that reference resources in other tenants. For example, it allows vnet peering where the target vnet exists in a different tenant as the source vnet. * Polish ChangeLog.md * Revert Resources.sln --------- Co-authored-by: Jin Lei <[email protected]> Co-authored-by: Lei Jin <[email protected]>
1 parent df9b223 commit 444eddd

File tree

5 files changed

+101
-44
lines changed

5 files changed

+101
-44
lines changed

src/Resources/ResourceManager/Implementation/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCmdlet.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public class NewAzureResourceGroupDeploymentCmdlet : DeploymentCreateCmdlet
7878
[Parameter(Mandatory = false, HelpMessage = "Run cmdlet in the background")]
7979
public SwitchParameter AsJob { get; set; }
8080

81+
[Parameter(Mandatory = false, HelpMessage = "Aux tenant ids for cross tenant references in deployments.")]
82+
public string[] AuxTenant { get; set; }
83+
8184
protected override ConfirmImpact ConfirmImpact => ((CmdletAttribute)Attribute.GetCustomAttribute(
8285
typeof(NewAzureResourceGroupDeploymentCmdlet),
8386
typeof(CmdletAttribute))).ConfirmImpact;
@@ -102,7 +105,8 @@ public class NewAzureResourceGroupDeploymentCmdlet : DeploymentCreateCmdlet
102105
Type = RollbackToLastDeployment ? OnErrorDeploymentType.LastSuccessful : OnErrorDeploymentType.SpecificDeployment,
103106
DeploymentName = RollbackToLastDeployment ? null : RollBackDeploymentName
104107
}
105-
: null
108+
: null,
109+
AuxTenantHeaders = GetAuxiliaryAuthHeaderFromTenantIds(AuxTenant)
106110
};
107111

108112
protected override PSDeploymentWhatIfCmdletParameters BuildWhatIfParameters() => new PSDeploymentWhatIfCmdletParameters(
@@ -117,7 +121,7 @@ public class NewAzureResourceGroupDeploymentCmdlet : DeploymentCreateCmdlet
117121
templateParametersUri: this.TemplateParameterUri,
118122
templateParametersObject: this.GetTemplateParameterObject(),
119123
resultFormat: this.WhatIfResultFormat,
120-
excludeChangeTypes: this.WhatIfExcludeChangeType);
124+
excludeChangeTypes: this.WhatIfExcludeChangeType);
121125

122126
protected override void OnProcessRecord()
123127
{

src/Resources/ResourceManager/SdkClient/NewResourceManagerSdkClient.cs

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,15 @@ private DeploymentValidateResult ValidateDeployment(PSDeploymentCmdletParameters
511511
return ResourceManagementClient.Deployments.ValidateAtManagementGroupScope(parameters.ManagementGroupId, parameters.DeploymentName, scopedDeployment);
512512

513513
case DeploymentScopeType.ResourceGroup:
514-
return ResourceManagementClient.Deployments.Validate(parameters.ResourceGroupName, parameters.DeploymentName, deployment);
514+
if (parameters.AuxTenantHeaders != null)
515+
{
516+
return ResourceManagementClient.Deployments.ValidateWithHttpMessagesAsync(parameters.ResourceGroupName, parameters.DeploymentName, deployment,
517+
customHeaders: ConvertAuxTenantDictionary(parameters.AuxTenantHeaders)).GetAwaiter().GetResult().Body;
518+
}
519+
else
520+
{
521+
return ResourceManagementClient.Deployments.Validate(parameters.ResourceGroupName, parameters.DeploymentName, deployment);
522+
}
515523

516524
case DeploymentScopeType.Subscription:
517525
default:
@@ -647,7 +655,15 @@ private void BeginDeployment(PSDeploymentCmdletParameters parameters, Deployment
647655
break;
648656

649657
case DeploymentScopeType.ResourceGroup:
650-
ResourceManagementClient.Deployments.BeginCreateOrUpdate(parameters.ResourceGroupName, parameters.DeploymentName, deployment);
658+
if (parameters.AuxTenantHeaders != null)
659+
{
660+
ResourceManagementClient.Deployments.BeginCreateOrUpdateWithHttpMessagesAsync(parameters.ResourceGroupName, parameters.DeploymentName, deployment,
661+
customHeaders: ConvertAuxTenantDictionary(parameters.AuxTenantHeaders)).GetAwaiter().GetResult();
662+
}
663+
else
664+
{
665+
ResourceManagementClient.Deployments.BeginCreateOrUpdate(parameters.ResourceGroupName, parameters.DeploymentName, deployment);
666+
}
651667
break;
652668

653669
case DeploymentScopeType.Subscription:
@@ -656,6 +672,22 @@ private void BeginDeployment(PSDeploymentCmdletParameters parameters, Deployment
656672
break;
657673
}
658674
}
675+
/// <summary>
676+
/// Conversion method for aux tenant dictionary to put it in correct format for passing as custom header object in sdk.
677+
/// </summary>
678+
/// <param name="auxTenants">Dictionary of tenant to tokens.</param>
679+
private Dictionary<string, List<string>> ConvertAuxTenantDictionary(IDictionary<string, IList<string>> auxTenants)
680+
{
681+
if (auxTenants == null) return null;
682+
683+
var headers = new Dictionary<string, List<string>> ();
684+
foreach (KeyValuePair<string, IList<string>> entry in auxTenants)
685+
{
686+
headers[entry.Key] = entry.Value.ToList();
687+
}
688+
689+
return headers;
690+
}
659691

660692
private void RunDeploymentValidation(PSDeploymentCmdletParameters parameters, Deployment deployment)
661693
{

src/Resources/ResourceManager/SdkModels/Deployments/PSDeploymentCmdletParameters.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@ public class PSDeploymentCmdletParameters
4141
public string DeploymentDebugLogLevel { get; set; }
4242

4343
public OnErrorDeployment OnErrorDeployment { get; set; }
44+
45+
public IDictionary<string, IList<string>> AuxTenantHeaders { get; set; }
4446
}
4547
}

src/Resources/Resources/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added `AuxTenant` parameter in `New-AzResourceGroupDeployment`to support cross-tenant deployment.
2223
* Supported `-SkipClientSideScopeValidation` in RoleAssignment and RoleDefinition related commands. [#22473]
2324
* Updated Bicep build logic to use --stdout flag instead of creating a temporary file on disk.
2425
* Fixed exception when `-ApiVersion` is specified for `Get-AzResource`, affected by some resource types.

src/Resources/Resources/help/New-AzResourceGroupDeployment.md

Lines changed: 58 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -18,56 +18,57 @@ Adds an Azure deployment to a resource group.
1818
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
1919
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
2020
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
21-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateFile <String> [-SkipTemplateParameterPrompt]
22-
[-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
21+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateFile <String>
22+
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
23+
[<CommonParameters>]
2324
```
2425

2526
### ByTemplateObjectAndParameterObject
2627
```
2728
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
2829
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
2930
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
30-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterObject <Hashtable>
31-
-TemplateObject <Hashtable> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
32-
[-WhatIf] [-Confirm] [<CommonParameters>]
31+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>]
32+
-TemplateParameterObject <Hashtable> -TemplateObject <Hashtable> [-SkipTemplateParameterPrompt] [-Pre]
33+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
3334
```
3435

3536
### ByTemplateFileAndParameterObject
3637
```
3738
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
3839
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
3940
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
40-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterObject <Hashtable>
41-
-TemplateFile <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
42-
[-WhatIf] [-Confirm] [<CommonParameters>]
41+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>]
42+
-TemplateParameterObject <Hashtable> -TemplateFile <String> [-SkipTemplateParameterPrompt] [-Pre]
43+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
4344
```
4445

4546
### ByTemplateUriAndParameterObject
4647
```
4748
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
4849
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
4950
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
50-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterObject <Hashtable>
51-
-TemplateUri <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
52-
[-WhatIf] [-Confirm] [<CommonParameters>]
51+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>]
52+
-TemplateParameterObject <Hashtable> -TemplateUri <String> [-SkipTemplateParameterPrompt] [-Pre]
53+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
5354
```
5455

5556
### ByTemplateSpecResourceIdAndParamsObject
5657
```
5758
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
5859
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
5960
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
60-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterObject <Hashtable>
61-
-TemplateSpecId <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
62-
[-WhatIf] [-Confirm] [<CommonParameters>]
61+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>]
62+
-TemplateParameterObject <Hashtable> -TemplateSpecId <String> [-SkipTemplateParameterPrompt] [-Pre]
63+
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
6364
```
6465

6566
### ByTemplateObjectAndParameterFile
6667
```
6768
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
6869
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
6970
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
70-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterFile <String>
71+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterFile <String>
7172
-TemplateObject <Hashtable> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
7273
[-WhatIf] [-Confirm] [<CommonParameters>]
7374
```
@@ -77,37 +78,37 @@ New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mod
7778
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
7879
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
7980
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
80-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterFile <String> -TemplateFile <String>
81-
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
82-
[<CommonParameters>]
81+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterFile <String>
82+
-TemplateFile <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
83+
[-WhatIf] [-Confirm] [<CommonParameters>]
8384
```
8485

8586
### ByTemplateUriAndParameterFile
8687
```
8788
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
8889
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
8990
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
90-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterFile <String> -TemplateUri <String>
91-
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
92-
[<CommonParameters>]
91+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterFile <String>
92+
-TemplateUri <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
93+
[-WhatIf] [-Confirm] [<CommonParameters>]
9394
```
9495

9596
### ByTemplateSpecResourceIdAndParams
9697
```
9798
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
9899
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
99100
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
100-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterFile <String> -TemplateSpecId <String>
101-
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
102-
[<CommonParameters>]
101+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterFile <String>
102+
-TemplateSpecId <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
103+
[-WhatIf] [-Confirm] [<CommonParameters>]
103104
```
104105

105106
### ByParameterFileWithNoTemplate
106107
```
107108
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
108109
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
109110
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
110-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterFile <String>
111+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterFile <String>
111112
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
112113
[<CommonParameters>]
113114
```
@@ -117,7 +118,7 @@ New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mod
117118
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
118119
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
119120
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
120-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterUri <String>
121+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterUri <String>
121122
-TemplateObject <Hashtable> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
122123
[-WhatIf] [-Confirm] [<CommonParameters>]
123124
```
@@ -127,37 +128,37 @@ New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mod
127128
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
128129
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
129130
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
130-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterUri <String> -TemplateFile <String>
131-
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
132-
[<CommonParameters>]
131+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterUri <String>
132+
-TemplateFile <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
133+
[-WhatIf] [-Confirm] [<CommonParameters>]
133134
```
134135

135136
### ByTemplateUriAndParameterUri
136137
```
137138
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
138139
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
139140
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
140-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterUri <String> -TemplateUri <String>
141-
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
142-
[<CommonParameters>]
141+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterUri <String>
142+
-TemplateUri <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
143+
[-WhatIf] [-Confirm] [<CommonParameters>]
143144
```
144145

145146
### ByTemplateSpecResourceIdAndParamsUri
146147
```
147148
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
148149
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
149150
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
150-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateParameterUri <String> -TemplateSpecId <String>
151-
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
152-
[<CommonParameters>]
151+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateParameterUri <String>
152+
-TemplateSpecId <String> [-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>]
153+
[-WhatIf] [-Confirm] [<CommonParameters>]
153154
```
154155

155156
### ByTemplateObjectWithNoParameters
156157
```
157158
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
158159
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
159160
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
160-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateObject <Hashtable>
161+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateObject <Hashtable>
161162
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
162163
[<CommonParameters>]
163164
```
@@ -167,17 +168,19 @@ New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mod
167168
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
168169
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
169170
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
170-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateUri <String> [-SkipTemplateParameterPrompt]
171-
[-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
171+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateUri <String>
172+
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
173+
[<CommonParameters>]
172174
```
173175

174176
### ByTemplateSpecResourceId
175177
```
176178
New-AzResourceGroupDeployment [-Name <String>] -ResourceGroupName <String> [-Mode <DeploymentMode>]
177179
[-DeploymentDebugLogLevel <String>] [-RollbackToLastDeployment] [-RollBackDeploymentName <String>]
178180
[-Tag <Hashtable>] [-WhatIfResultFormat <WhatIfResultFormat>] [-WhatIfExcludeChangeType <String[]>] [-Force]
179-
[-ProceedIfNoChange] [-AsJob] [-QueryString <String>] -TemplateSpecId <String> [-SkipTemplateParameterPrompt]
180-
[-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
181+
[-ProceedIfNoChange] [-AsJob] [-AuxTenant <String[]>] [-QueryString <String>] -TemplateSpecId <String>
182+
[-SkipTemplateParameterPrompt] [-Pre] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
183+
[<CommonParameters>]
181184
```
182185

183186
## DESCRIPTION
@@ -264,6 +267,21 @@ Accept pipeline input: False
264267
Accept wildcard characters: False
265268
```
266269
270+
### -AuxTenant
271+
Aux tenant ids for cross tenant deployments
272+
273+
```yaml
274+
Type: System.String[]
275+
Parameter Sets: (All)
276+
Aliases:
277+
278+
Required: False
279+
Position: Named
280+
Default value: None
281+
Accept pipeline input: False
282+
Accept wildcard characters: False
283+
```
284+
267285
### -DefaultProfile
268286
The credentials, account, tenant, and subscription used for communication with azure
269287

0 commit comments

Comments
 (0)