Skip to content

Commit

Permalink
generate dev template
Browse files Browse the repository at this point in the history
  • Loading branch information
kubasobon committed Mar 12, 2024
1 parent dfca8ef commit 425783d
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions deploy/azure/ARM-for-organization-account.dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@
"AdditionalRoleGUID": {
"value": "[variables('roleGUID')]"
},
"ManagementGroupID": {
"value": "[managementGroup().id]"
},
"ResourceGroupName": {
"value": "[parameters('ResourceGroupName')]"
},
Expand All @@ -123,6 +126,9 @@
"AdditionalRoleGUID": {
"type": "string"
},
"ManagementGroupID": {
"type": "string"
},
"ResourceGroupName": {
"type": "string"
},
Expand All @@ -134,7 +140,7 @@
{
"type": "Microsoft.Authorization/roleAssignments",
"apiVersion": "2022-04-01",
"name": "[guid(managementGroup().id, parameters('SubscriptionId'), parameters('ResourceGroupName'), deployment().name, 'securityaudit')]",
"name": "[guid(parameters('ManagementGroupID'), parameters('SubscriptionId'), parameters('ResourceGroupName'), deployment().name, 'securityaudit')]",
"properties": {
"roleDefinitionId": "/providers/Microsoft.Authorization/roleDefinitions/acdd72a7-3385-48ef-bd42-f606fba81ae7",
"principalId": "[reference(resourceId(parameters('SubscriptionId'), parameters('ResourceGroupName'), 'Microsoft.Compute/virtualMachines', 'cloudbeatVM'), '2019-07-01', 'Full').identity.principalId]",
Expand Down Expand Up @@ -178,6 +184,11 @@
"template": {
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"PublicKeyDevOnly": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.Compute/virtualMachines",
Expand Down Expand Up @@ -308,8 +319,8 @@
"name": "[parameters('AdditionalRoleGUID')]",
"properties": {
"assignableScopes": [
"[managementGroup().id]",
"[concat('/subscriptions/', parameters('SubscriptionId')]",
"[parameters('ManagementGroupID')]",
"[concat('/subscriptions/', parameters('SubscriptionId'))]",
"[concat('/subscriptions/', parameters('SubscriptionId'), '/resourcegroups/', parameters('ResourceGroupName'))]"
],
"description": "Additional read permissions for cloudbeatVM",
Expand Down Expand Up @@ -359,12 +370,7 @@
]
}
}
],
"parameters": {
"PublicKeyDevOnly": {
"type": "string"
}
}
]
}
},
"dependsOn": [
Expand Down

0 comments on commit 425783d

Please sign in to comment.