Skip to content

Commit

Permalink
Fixed rg policy
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasguentert committed Nov 26, 2021
1 parent 51ad06e commit efedb0f
Show file tree
Hide file tree
Showing 64 changed files with 1,121 additions and 478 deletions.
13 changes: 9 additions & 4 deletions Generate-Biceps.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ps = @(
### General
@('mg','mg-*','Microsoft.Management/managementGroups'),
@('rg','rg-*','Microsoft.Resources/resourceGroups'),
@('rg','rg-*','Microsoft.Resources/subscriptions/resourceGroups'),
@('policy','policy-*','Microsoft.Authorization/policyDefinitions'),
@('apim','apim-*','Microsoft.ApiManagement/service'),
@('id','id-*','Microsoft.ManagedIdentity/userAssignedIdentities'),
Expand Down Expand Up @@ -43,14 +43,16 @@ $ps = @(
@('aks','aks-*','Microsoft.ContainerService/managedClusters'),
#@('sf','sf-*',''),
#@('ase','ase-*',''),
@('plan','plan-*','Microsoft.Web/serverfarms'),
@('app','app-*','Microsoft.Web/sites'),
#@('stapp','stapp',''),
#@('func','func-*','Microsoft.Web/sites'), kind: "functionapp"
#@('cld','cld-*',''),
@('ntf','ntf-*','Microsoft.NotificationHubs/namespaces/notificationHubs'),
@('ntfns','ntfs-*','Microsoft.NotificationHubs/namespaces'),

# One-of templates not based on module
#@('plan','plan-*','Microsoft.Web/serverfarms'),
#@('app','app-*','Microsoft.Web/sites'),

### Databases
@('sql','sql-*','Microsoft.Sql/servers'),
@('sqldb','sqldb-*','Microsoft.Sql/servers/databases'),
Expand Down Expand Up @@ -113,7 +115,10 @@ $ps = @(
#@('bp','bp-*',''),
#@('bpa','bpa-*',''),
@('kv','kv-*','Microsoft.KeyVault/vaults'),
@('log','log-*','Microsoft.OperationalInsights/workspaces'),

# One-off template not based on module
#@('log','log-*','Microsoft.OperationalInsights/workspaces'),

@('appi','appi-*','Microsoft.Insights/components'),

### Migration
Expand Down
2 changes: 1 addition & 1 deletion bicep/naming-convention-rg.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ module rg '../modules/naming-convention-generic.bicep' = {
pattern: 'rg-*'
policyName: 'policy-naming-convention-rg'
assignmentName: 'assignment-naming-convention-rg'
type: 'Microsoft.Resources/resourceGroups'
type: 'Microsoft.Resources/subscriptions/resourceGroups'
}
}
11 changes: 11 additions & 0 deletions bicep/naming-convention-stap.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
targetScope = 'subscription'

module stap '../modules/naming-convention-generic.bicep' = {
name: 'policy-naming-convention-stap'
params: {
pattern: 'stap-*'
policyName: 'policy-naming-convention-stap'
assignmentName: 'assignment-naming-convention-stap'
type: 'Microsoft.Web/staticSites'
}
}
113 changes: 113 additions & 0 deletions dist/links.txt

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions dist/naming-convention-aa.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "631566917481269233"
}
},
"functions": [],
"resources": [
{
Expand Down Expand Up @@ -30,6 +37,13 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1962347804019361325"
}
},
"parameters": {
"pattern": {
"type": "string"
Expand Down Expand Up @@ -111,12 +125,5 @@
}
}
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "8446873090382594437"
}
}
]
}
23 changes: 15 additions & 8 deletions dist/naming-convention-acr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "16413849268523323661"
}
},
"functions": [],
"resources": [
{
Expand Down Expand Up @@ -30,6 +37,13 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1962347804019361325"
}
},
"parameters": {
"pattern": {
"type": "string"
Expand Down Expand Up @@ -111,12 +125,5 @@
}
}
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "11514395220464931939"
}
}
]
}
23 changes: 15 additions & 8 deletions dist/naming-convention-agw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "13818346388020362651"
}
},
"functions": [],
"resources": [
{
Expand Down Expand Up @@ -30,6 +37,13 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1962347804019361325"
}
},
"parameters": {
"pattern": {
"type": "string"
Expand Down Expand Up @@ -111,12 +125,5 @@
}
}
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "10263410350231059144"
}
}
]
}
23 changes: 15 additions & 8 deletions dist/naming-convention-aks.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "4774043848403070754"
}
},
"functions": [],
"resources": [
{
Expand Down Expand Up @@ -30,6 +37,13 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1962347804019361325"
}
},
"parameters": {
"pattern": {
"type": "string"
Expand Down Expand Up @@ -111,12 +125,5 @@
}
}
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "5713793204619125816"
}
}
]
}
23 changes: 15 additions & 8 deletions dist/naming-convention-apim.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "5592379025594685919"
}
},
"functions": [],
"resources": [
{
Expand Down Expand Up @@ -30,6 +37,13 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1962347804019361325"
}
},
"parameters": {
"pattern": {
"type": "string"
Expand Down Expand Up @@ -111,12 +125,5 @@
}
}
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "6460739481788101597"
}
}
]
}
16 changes: 8 additions & 8 deletions dist/naming-convention-app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "17669763579272616163"
}
},
"parameters": {
"pattern": {
"type": "string",
Expand Down Expand Up @@ -74,12 +81,5 @@
"[subscriptionResourceId('Microsoft.Authorization/policyDefinitions', 'policy-naming-convention-app')]"
]
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.126.58533",
"templateHash": "16464772550086128408"
}
}
]
}
23 changes: 15 additions & 8 deletions dist/naming-convention-appcs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "12401823803509751397"
}
},
"functions": [],
"resources": [
{
Expand Down Expand Up @@ -30,6 +37,13 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1962347804019361325"
}
},
"parameters": {
"pattern": {
"type": "string"
Expand Down Expand Up @@ -111,12 +125,5 @@
}
}
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "14618296185435769258"
}
}
]
}
23 changes: 15 additions & 8 deletions dist/naming-convention-appi.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "7006744813925474859"
}
},
"functions": [],
"resources": [
{
Expand Down Expand Up @@ -30,6 +37,13 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1962347804019361325"
}
},
"parameters": {
"pattern": {
"type": "string"
Expand Down Expand Up @@ -111,12 +125,5 @@
}
}
}
],
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.3.1.62928",
"templateHash": "4204968213058471792"
}
}
]
}
Loading

0 comments on commit efedb0f

Please sign in to comment.