Skip to content

Commit

Permalink
Filter available types by target scope
Browse files Browse the repository at this point in the history
  • Loading branch information
anthony-c-martin committed Jan 14, 2021
1 parent 39fb47c commit aba44c6
Show file tree
Hide file tree
Showing 19 changed files with 13,187 additions and 15,289 deletions.
2 changes: 2 additions & 0 deletions docs/examples/101/cyclecloud/sub.bicep
@@ -1,3 +1,5 @@
targetScope = 'subscription'

resource rg 'Microsoft.Resources/resourceGroups@2019-05-01' = {
name: 'rg-bicep'
location: 'eastus'
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/101/cyclecloud/sub.json
@@ -1,5 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"functions": [],
"resources": [
Expand Down
@@ -1,3 +1,5 @@
targetScope = 'subscription'

resource rg 'Microsoft.Resources/resourceGroups@2019-05-01' = {
name: 'rg-bicep'
location: 'uksouth'
Expand Down
@@ -1,5 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"functions": [],
"resources": [
Expand Down
2 changes: 2 additions & 0 deletions docs/examples/201/cyclecloud/sub.bicep
@@ -1,3 +1,5 @@
targetScope = 'subscription'

resource rg 'Microsoft.Resources/resourceGroups@2019-05-01' = {
name: 'rg-bicep'
location: 'uksouth'
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/201/cyclecloud/sub.json
@@ -1,5 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"functions": [],
"resources": [
Expand Down
@@ -1,3 +1,5 @@
targetScope = 'subscription'

param listOfAllowedLocations array = [
'eastus'
'eastus2'
Expand Down
@@ -1,5 +1,5 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"listOfAllowedLocations": {
Expand Down Expand Up @@ -95,7 +95,7 @@
"properties": {
"scope": "[subscription().id]",
"enforcementMode": "Default",
"policyDefinitionId": "[resourceId('Microsoft.Authorization/policySetDefinitions', variables('initiativeDefinitionName'))]",
"policyDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/policySetDefinitions', variables('initiativeDefinitionName'))]",
"parameters": {
"listOfAllowedLocations": {
"value": "[parameters('listOfAllowedLocations')]"
Expand All @@ -106,7 +106,7 @@
}
},
"dependsOn": [
"[resourceId('Microsoft.Authorization/policySetDefinitions', variables('initiativeDefinitionName'))]"
"[subscriptionResourceId('Microsoft.Authorization/policySetDefinitions', variables('initiativeDefinitionName'))]"
]
}
]
Expand Down

0 comments on commit aba44c6

Please sign in to comment.