az/groupmanager-v1.template.json

264 lines
8.0 KiB
JSON

{
"$schema": "http://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"tenantName": {
"defaultValue": "exampleorg",
"type": "string"
},
"projectName": {
"defaultValue": "groupmanager",
"type": "string"
},
"projectEnvironment": {
"defaultValue": "d",
"type": "string"
},
"projectVersion": {
"defaultValue": "v1",
"type": "string"
},
"subscriptionId": {
"defaultValue": "00000000-0000-0000-0000-000000000000",
"type": "string"
}
},
"variables": {
"projectPrefix": "[concat(parameters('projectName'), '-', parameters('projectEnvironment'), '-', parameters('projectVersion'))]",
"swaName": "[concat(parameters('tenantName'), '-', variables('projectPrefix'), '-swa')]",
"miName": "[concat(variables('projectPrefix'), '-mi')]",
"saName": "[concat(parameters('tenantName'), parameters('projectName'), parameters('projectEnvironment'), parameters('projectVersion'), 'sa')]",
"fsName": "[concat(parameters('tenantName'), '-', variables('projectPrefix'), '-func')]"
},
"resources": [
{
"type": "Microsoft.ManagedIdentity/userAssignedIdentities",
"apiVersion": "2023-07-31-preview",
"name": "[variables('miName')]",
"location": "uksouth"
},
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2023-05-01",
"name": "[variables('saName')]",
"location": "uksouth",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "Storage",
"properties": {
"allowedCopyScope": "AAD",
"defaultToOAuthAuthentication": true,
"allowCrossTenantReplication": false,
"minimumTlsVersion": "TLS1_2",
"allowBlobPublicAccess": false,
"allowSharedKeyAccess": true,
"networkAcls": {
"bypass": "AzureServices",
"virtualNetworkRules": [],
"ipRules": [],
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": true,
"encryption": {
"services": {
"file": {
"keyType": "Account",
"enabled": true
},
"blob": {
"keyType": "Account",
"enabled": true
}
},
"keySource": "Microsoft.Storage"
}
}
},
{
"type": "Microsoft.Web/staticSites",
"apiVersion": "2023-12-01",
"name": "[variables('swaName')]",
"location": "West Europe",
"tags": {
"hidden-link: /app-insights-resource-id": "/subscriptions/56aa1670-6826-4e0f-b415-10f242bbd995/resourceGroups/general-p-rg/providers/microsoft.insights/components/wndsh-openapi-function-test-v1-func",
"hidden-link: /app-insights-instrumentation-key": "a5699918-8985-4069-8fa3-252aaeac0ac5",
"hidden-link: /app-insights-conn-string": "InstrumentationKey=a5699918-8985-4069-8fa3-252aaeac0ac5;IngestionEndpoint=https://uksouth-1.in.applicationinsights.azure.com/;LiveEndpoint=https://uksouth.livediagnostics.monitor.azure.com/;ApplicationId=e8916dde-8ac7-4ee5-ac81-d35013aa9750"
},
"sku": {
"name": "Free",
"tier": "Free"
},
"properties": {
"repositoryUrl": "https://github.com/NathanWindisch/group-manager-swa",
"branch": "main",
"stagingEnvironmentPolicy": "Enabled",
"allowConfigFileUpdates": true,
"provider": "GitHub",
"enterpriseGradeCdnStatus": "Disabled"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"cors": {
"corsRules": []
},
"deleteRetentionPolicy": {
"allowPermanentDelete": false,
"enabled": false
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/fileServices",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"properties": {
"protocolSettings": {
"smb": {}
},
"cors": {
"corsRules": []
},
"shareDeleteRetentionPolicy": {
"enabled": true,
"days": 7
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {
"cors": {
"corsRules": []
}
}
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {
"cors": {
"corsRules": []
}
}
},
{
"type": "Microsoft.Web/staticSites/basicAuth",
"apiVersion": "2023-12-01",
"name": "[concat(variables('swaName'), '/default')]",
"location": "West Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/staticSites', variables('swaName'))]"
],
"properties": {
"applicableEnvironmentsMode": "SpecifiedEnvironments"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default/azure-webjobs-hosts')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('saName'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {
"immutableStorageWithVersioning": {
"enabled": false
},
"defaultEncryptionScope": "$account-encryption-key",
"denyEncryptionScopeOverride": false,
"publicAccess": "None"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default/azure-webjobs-secrets')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/blobServices', variables('saName'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {
"immutableStorageWithVersioning": {
"enabled": false
},
"defaultEncryptionScope": "$account-encryption-key",
"denyEncryptionScopeOverride": false,
"publicAccess": "None"
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default/members')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', variables('saName'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/queueServices/queues",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default/permissions')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/queueServices', variables('saName'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {
"metadata": {}
}
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices/tables",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default/permissions')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/tableServices', variables('saName'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {}
},
{
"type": "Microsoft.Storage/storageAccounts/tableServices/tables",
"apiVersion": "2023-05-01",
"name": "[concat(variables('saName'), '/default/users')]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts/tableServices', variables('saName'), 'default')]",
"[resourceId('Microsoft.Storage/storageAccounts', variables('saName'))]"
],
"properties": {}
}
]
}