mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 11:35:40 +01:00
Merge pull request #2541 from anthony-c-martin/patch-1
Add Bicep sample
This commit is contained in:
commit
58344d47d1
3 changed files with 62 additions and 0 deletions
File diff suppressed because one or more lines are too long
29
test/samples/sample.bicep.txt
Normal file
29
test/samples/sample.bicep.txt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
targetScope = 'subscription'
|
||||
|
||||
param deployStorage bool = true
|
||||
|
||||
@description('The object ID of the principal that will get the role assignment')
|
||||
param aadPrincipalId string
|
||||
|
||||
module stg './storage.bicep' = if(deployStorage) {
|
||||
name: 'storageDeploy'
|
||||
scope: resourceGroup('another-rg') // this will target another resource group in the same subscription
|
||||
params: {
|
||||
storageAccountName: '<YOURUNIQUESTORAGENAME>'
|
||||
}
|
||||
}
|
||||
|
||||
var contributor = 'b24988ac-6180-42a0-ab88-20f7382dd24c'
|
||||
resource roleDef 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {
|
||||
name: contributor
|
||||
}
|
||||
|
||||
resource rbac 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
|
||||
name: guid(subscription().id, aadPrincipalId, contributor)
|
||||
properties: {
|
||||
roleDefinitionId: roleDef.id
|
||||
principalId: aadPrincipalId
|
||||
}
|
||||
}
|
||||
|
||||
output storageName array = stg.outputs.containerProps
|
||||
29
website/index/samples/sample.bicep.txt
Normal file
29
website/index/samples/sample.bicep.txt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
targetScope = 'subscription'
|
||||
|
||||
param deployStorage bool = true
|
||||
|
||||
@description('The object ID of the principal that will get the role assignment')
|
||||
param aadPrincipalId string
|
||||
|
||||
module stg './storage.bicep' = if(deployStorage) {
|
||||
name: 'storageDeploy'
|
||||
scope: resourceGroup('another-rg') // this will target another resource group in the same subscription
|
||||
params: {
|
||||
storageAccountName: '<YOURUNIQUESTORAGENAME>'
|
||||
}
|
||||
}
|
||||
|
||||
var contributor = 'b24988ac-6180-42a0-ab88-20f7382dd24c'
|
||||
resource roleDef 'Microsoft.Authorization/roleDefinitions@2018-01-01-preview' existing = {
|
||||
name: contributor
|
||||
}
|
||||
|
||||
resource rbac 'Microsoft.Authorization/roleAssignments@2020-04-01-preview' = {
|
||||
name: guid(subscription().id, aadPrincipalId, contributor)
|
||||
properties: {
|
||||
roleDefinitionId: roleDef.id
|
||||
principalId: aadPrincipalId
|
||||
}
|
||||
}
|
||||
|
||||
output storageName array = stg.outputs.containerProps
|
||||
Loading…
Add table
Add a link
Reference in a new issue