-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow same param to be used for multiple properties (#42330)
- Loading branch information
1 parent
68b441a
commit f9a32a8
Showing
5 changed files
with
112 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ovisioning/tests/Infrastructure/CanAddCustomLocationParameterInInteractiveMode/main.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
targetScope = 'resourceGroup' | ||
|
||
@description('') | ||
param location string = resourceGroup().location | ||
|
||
@description('') | ||
param myLocationParam string | ||
|
||
|
||
resource storageAccount_YRiDhR43q 'Microsoft.Storage/storageAccounts@2022-09-01' = { | ||
name: toLower(take(concat('photoAcct', uniqueString(resourceGroup().id)), 24)) | ||
location: myLocationParam | ||
sku: { | ||
name: 'Premium_LRS' | ||
} | ||
kind: 'StorageV2' | ||
properties: { | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
.../Azure.Provisioning/tests/Infrastructure/CanAssignParameterToMultipleResources/main.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
targetScope = 'subscription' | ||
|
||
@description('') | ||
param overrideLocation string | ||
|
||
|
||
resource resourceGroup_I6QNkoPsb 'Microsoft.Resources/resourceGroups@2023-07-01' = { | ||
name: 'rg-TEST' | ||
location: 'westus' | ||
tags: { | ||
'azd-env-name': 'TEST' | ||
} | ||
} | ||
|
||
module rg_TEST_module './resources/rg_TEST_module/rg_TEST_module.bicep' = { | ||
name: 'rg_TEST_module' | ||
scope: resourceGroup_I6QNkoPsb | ||
params: { | ||
overrideLocation: overrideLocation | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
...cture/CanAssignParameterToMultipleResources/resources/rg_TEST_module/rg_TEST_module.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
@description('') | ||
param overrideLocation string | ||
|
||
|
||
resource storageAccount_melvnlpF2 'Microsoft.Storage/storageAccounts@2022-09-01' = { | ||
name: toLower(take(concat('photoAcct', uniqueString(resourceGroup().id)), 24)) | ||
location: 'westus' | ||
sku: { | ||
name: 'Premium_LRS' | ||
} | ||
kind: 'StorageV2' | ||
properties: { | ||
} | ||
} | ||
|
||
resource storageAccount_DysMV79Ig 'Microsoft.Storage/storageAccounts@2022-09-01' = { | ||
name: toLower(take(concat('sa1', uniqueString(resourceGroup().id)), 24)) | ||
location: overrideLocation | ||
sku: { | ||
name: 'Standard_LRS' | ||
} | ||
kind: 'StorageV2' | ||
properties: { | ||
} | ||
} | ||
|
||
resource storageAccount_I0kTuAmmD 'Microsoft.Storage/storageAccounts@2022-09-01' = { | ||
name: toLower(take(concat('sa2', uniqueString(resourceGroup().id)), 24)) | ||
location: overrideLocation | ||
sku: { | ||
name: 'Standard_LRS' | ||
} | ||
kind: 'StorageV2' | ||
properties: { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters