-
Notifications
You must be signed in to change notification settings - Fork 764
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reintroduce 'resourceInfo' code generation behind experimental feature (
#16045) The original issues with the resourceInfo function have been fixed in the backend. This PR brings back the simplified code generation using the `resourceInfo` function for `id`, `type`, `name` and `apiVersion` properties, behind an experimental feature flag. Closes #12597 ###### Microsoft Reviewers: [Open in CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/16045)
- Loading branch information
1 parent
3be0281
commit 74c4ce3
Showing
23 changed files
with
1,656 additions
and
25 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
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
30 changes: 30 additions & 0 deletions
30
...grationTests/Files/SymbolicNameTests/ResourceInfo/sql-database-with-management/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,30 @@ | ||
targetScope = 'subscription' | ||
|
||
@description('Resource Group object definition.') | ||
param resourceGroup object | ||
|
||
var defaultResourceGroupProperties = { | ||
tags: {} | ||
deploy: true | ||
} | ||
|
||
// Deploy Resource Group | ||
resource sqlRg 'Microsoft.Resources/resourceGroups@2021-04-01' = if (union( | ||
defaultResourceGroupProperties, | ||
resourceGroup | ||
).deploy) { | ||
name: resourceGroup.name | ||
location: resourceGroup.location | ||
tags: union(defaultResourceGroupProperties, resourceGroup).tags | ||
properties: {} | ||
} | ||
|
||
// Start SQL Logical Servers deployment | ||
module sqlLogicalServers 'modules/sql-logical-servers.bicep' = { | ||
name: 'sqlLogicalServers' | ||
scope: sqlRg | ||
params: { | ||
sqlLogicalServers: resourceGroup.sqlLogicalServers | ||
tags: union(defaultResourceGroupProperties, resourceGroup).tags | ||
} | ||
} |
Oops, something went wrong.