From 2ff601cf1bfcbd963d7118acfcfa68ed1464047b Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 10:30:33 +0200 Subject: [PATCH 01/27] First commit --- .../.test/gremlindb.parameters.json | 16 ++++++++-------- .../gremlinDatabases/deploy.bicep | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json b/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json index ec025620b5..a930d2ed3a 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json +++ b/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "name": { - "value": "<>-az-cdb-gremlindb-001" + "value": "carml-az-cdb-gremlindb-001" }, "location": { "value": "West Europe" @@ -32,7 +32,7 @@ { "roleDefinitionIdOrName": "Reader", "principalIds": [ - "<>" + "e58511af-4da2-449c-a5cd-6a10271cfb83" ] } ] @@ -40,7 +40,7 @@ "gremlinDatabases": { "value": [ { - "name": "<>-az-gdb-x-001", + "name": "carml-az-gdb-x-001", "graphs": [ { "name": "car_collection", @@ -59,7 +59,7 @@ ] }, { - "name": "<>-az-gdb-x-002", + "name": "carml-az-gdb-x-002", "collections": [ { "name": "bike_collection", @@ -83,16 +83,16 @@ "value": 7 }, "diagnosticStorageAccountId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" + "value": "/subscriptions/a7439831-1cd9-435d-a091-4aa863c96556/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adpcarmlazsax001" }, "diagnosticWorkspaceId": { - "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" + "value": "/subscriptions/a7439831-1cd9-435d-a091-4aa863c96556/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-carml-az-law-x-001" }, "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" + "value": "/subscriptions/a7439831-1cd9-435d-a091-4aa863c96556/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-carml-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" }, "diagnosticEventHubName": { - "value": "adp-<>-az-evh-x-001" + "value": "adp-carml-az-evh-x-001" }, "systemAssignedIdentity": { "value": true diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep b/modules/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep index 956bb758f5..216c5dd7ec 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep +++ b/modules/Microsoft.DocumentDB/databaseAccounts/gremlinDatabases/deploy.bicep @@ -50,7 +50,7 @@ resource databaseAccount 'Microsoft.DocumentDB/databaseAccounts@2022-02-15-previ name: databaseAccountName } -var databaseOptions = contains(databaseAccount.properties.capabilities, 'EnableServerless') ? {} : { +var databaseOptions = contains(databaseAccount.properties.capabilities, { name: 'EnableServerless' }) ? {} : { autoscaleSettings: throughput == -1 ? { maxThroughput: maxThroughput } : null From b7e221f2dc9c7d0015b834ca610edaed22f109d4 Mon Sep 17 00:00:00 2001 From: Jan-Henrik Damaschke Date: Tue, 12 Jul 2022 10:31:53 +0200 Subject: [PATCH 02/27] [Modules] Multi additions to staticSites (#1655) * feat(staticsites): Added linkedBackends to staticSites extension * feat(staticsites): Added tests, readme, linkedBackends * docs(staticsites): Removed parameter placeholder * Update modules/Microsoft.Web/staticSites/config/readme.md Co-authored-by: Alexander Sehr * Update modules/Microsoft.Web/staticSites/config/readme.md Co-authored-by: Alexander Sehr * Update modules/Microsoft.Web/staticSites/customDomains/readme.md Co-authored-by: Alexander Sehr * Update modules/Microsoft.Web/staticSites/linkedBackends/readme.md Co-authored-by: Alexander Sehr * fix(staticsites): Integrated PR feedback Co-authored-by: Alexander Sehr --- .../staticSites/.test/min.parameters.json | 12 +- .../staticSites/.test/parameters.json | 124 ++- .../staticSites/config/deploy.bicep | 33 + .../staticSites/config/readme.md | 37 + .../staticSites/config/version.json | 4 + .../staticSites/customDomains/deploy.bicep | 29 + .../staticSites/customDomains/readme.md | 37 + .../staticSites/customDomains/version.json | 4 + .../Microsoft.Web/staticSites/deploy.bicep | 50 +- .../staticSites/linkedBackends/deploy.bicep | 33 + .../staticSites/linkedBackends/readme.md | 42 + .../staticSites/linkedBackends/version.json | 4 + modules/Microsoft.Web/staticSites/readme.md | 863 +++++++++--------- .../Microsoft.Web/staticSites/version.json | 2 +- 14 files changed, 808 insertions(+), 466 deletions(-) create mode 100644 modules/Microsoft.Web/staticSites/config/deploy.bicep create mode 100644 modules/Microsoft.Web/staticSites/config/readme.md create mode 100644 modules/Microsoft.Web/staticSites/config/version.json create mode 100644 modules/Microsoft.Web/staticSites/customDomains/deploy.bicep create mode 100644 modules/Microsoft.Web/staticSites/customDomains/readme.md create mode 100644 modules/Microsoft.Web/staticSites/customDomains/version.json create mode 100644 modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep create mode 100644 modules/Microsoft.Web/staticSites/linkedBackends/readme.md create mode 100644 modules/Microsoft.Web/staticSites/linkedBackends/version.json diff --git a/modules/Microsoft.Web/staticSites/.test/min.parameters.json b/modules/Microsoft.Web/staticSites/.test/min.parameters.json index b5781f46f0..dd29975a58 100644 --- a/modules/Microsoft.Web/staticSites/.test/min.parameters.json +++ b/modules/Microsoft.Web/staticSites/.test/min.parameters.json @@ -1,9 +1,9 @@ { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-min-001" - } + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-min-001" } + } } diff --git a/modules/Microsoft.Web/staticSites/.test/parameters.json b/modules/Microsoft.Web/staticSites/.test/parameters.json index 68d8697715..4728d3cd16 100644 --- a/modules/Microsoft.Web/staticSites/.test/parameters.json +++ b/modules/Microsoft.Web/staticSites/.test/parameters.json @@ -1,50 +1,74 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-x-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "sku": { - "value": "Standard" - }, - "stagingEnvironmentPolicy": { - "value": "Enabled" - }, - "allowConfigFileUpdates": { - "value": true - }, - "enterpriseGradeCdnStatus": { - "value": "Disabled" - }, - "systemAssignedIdentity": { - "value": true - }, - "userAssignedIdentities": { - "value": { - "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} - } - }, - "roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "principalIds": [ - "<>" - ] - } - ] - }, - "privateEndpoints": { - "value": [ - { - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", - "service": "staticSites" - } - ] - } - } -} +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-x-001" + }, + "lock": { + "value": "CanNotDelete" + }, + "sku": { + "value": "Standard" + }, + "stagingEnvironmentPolicy": { + "value": "Enabled" + }, + "allowConfigFileUpdates": { + "value": true + }, + "enterpriseGradeCdnStatus": { + "value": "Disabled" + }, + "systemAssignedIdentity": { + "value": true + }, + "customDomains": { + "value": [ + "<>domain1.domain", + "<>domain2.domain.domain", + "<>domain3.domain.domain.domain" + ] + }, + "appSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "functionAppSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "userAssignedIdentities": { + "value": { + "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} + } + }, + "roleAssignments": { + "value": [ + { + "roleDefinitionIdOrName": "Reader", + "principalIds": [ + "<>" + ] + } + ] + }, + "privateEndpoints": { + "value": [ + { + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", + "service": "staticSites" + } + ] + }, + "linkedBackend": { + "value": { + "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001" + } + } + } +} diff --git a/modules/Microsoft.Web/staticSites/config/deploy.bicep b/modules/Microsoft.Web/staticSites/config/deploy.bicep new file mode 100644 index 0000000000..453d5922be --- /dev/null +++ b/modules/Microsoft.Web/staticSites/config/deploy.bicep @@ -0,0 +1,33 @@ +@allowed([ + 'appsettings' + 'functionappsettings' +]) +@description('Required. Type of settings to apply.') +param kind string + +@description('Required. App settings.') +param properties object + +@description('Conditional. The name of the parent Static Web App. Required if the template is used in a standalone deployment.') +param staticSiteName string + +resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { + name: staticSiteName +} + +resource config 'Microsoft.Web/staticSites/config@2022-03-01' = { + #disable-next-line BCP225 + name: kind + parent: staticSite + properties: properties +} + +@description('The name of the config.') +output name string = config.name + +@description('The resource ID of the config.') +output resourceId string = config.id + +@description('The name of the resource group the config was created in.') +output resourceGroupName string = resourceGroup().name + diff --git a/modules/Microsoft.Web/staticSites/config/readme.md b/modules/Microsoft.Web/staticSites/config/readme.md new file mode 100644 index 0000000000..9ec0d83799 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/config/readme.md @@ -0,0 +1,37 @@ +# Static Site Config `[Microsoft.Web/staticSites/config]` + +This module deploys a Static Site Config. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Allowed Values | Description | +| :-- | :-- | :-- | :-- | +| `kind` | string | `[appsettings, functionappsettings]` | Type of settings to apply. | +| `properties` | object | | App settings. | + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | + + +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the config. | +| `resourceGroupName` | string | The name of the resource group the config was created in. | +| `resourceId` | string | The resource ID of the config. | diff --git a/modules/Microsoft.Web/staticSites/config/version.json b/modules/Microsoft.Web/staticSites/config/version.json new file mode 100644 index 0000000000..d52c7d0010 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/config/version.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "0.6" +} diff --git a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep new file mode 100644 index 0000000000..bd6ad9d005 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep @@ -0,0 +1,29 @@ +@description('Conditional. The custom domain name. Required if the template is used in a standalone deployment.') +param name string + +@description('Conditional. The name of the parent Static Web App. Required if the template is used in a standalone deployment.') +param staticSiteName string + +@description('Optional. Validation method for adding a custom domain.') +param validationMethod string = 'cname-delegation' + +resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { + name: staticSiteName +} + +resource customDomain 'Microsoft.Web/staticSites/customDomains@2022-03-01' = { + name: name + parent: staticSite + properties: { + validationMethod: validationMethod + } +} + +@description('The name of the static site.') +output name string = customDomain.name + +@description('The resource ID of the static site.') +output resourceId string = customDomain.id + +@description('The resource group the static site was deployed into.') +output resourceGroupName string = resourceGroup().name diff --git a/modules/Microsoft.Web/staticSites/customDomains/readme.md b/modules/Microsoft.Web/staticSites/customDomains/readme.md new file mode 100644 index 0000000000..8c2307e642 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/customDomains/readme.md @@ -0,0 +1,37 @@ +# Static Site Custom Domain `[Microsoft.Web/staticSites/customDomains]` + +This module deploys a Custom Domain into a Static Site. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | + +## Parameters + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The custom domain name. Required if the template is used in a standalone deployment. | +| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `validationMethod` | string | `'cname-delegation'` | Validation method for adding a custom domain. | + + +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the static site. | +| `resourceGroupName` | string | The resource group the static site was deployed into. | +| `resourceId` | string | The resource ID of the static site. | diff --git a/modules/Microsoft.Web/staticSites/customDomains/version.json b/modules/Microsoft.Web/staticSites/customDomains/version.json new file mode 100644 index 0000000000..d52c7d0010 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/customDomains/version.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "0.6" +} diff --git a/modules/Microsoft.Web/staticSites/deploy.bicep b/modules/Microsoft.Web/staticSites/deploy.bicep index 7fff54a10e..116eb2de02 100644 --- a/modules/Microsoft.Web/staticSites/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/deploy.bicep @@ -10,7 +10,7 @@ param name string @description('Optional. Type of static site to deploy.') param sku string = 'Free' -@description('Optional. If config file is locked for this static web app.') +@description('Optional. False if config file is locked for this static web app; otherwise, true.') param allowConfigFileUpdates bool = true @description('Optional. Location to deploy static site. The following locations are supported: CentralUS, EastUS2, EastAsia, WestEurope, WestUS2.') @@ -77,6 +77,18 @@ param enableDefaultTelemetry bool = true @description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalId\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.') param roleAssignments array = [] +@description('Optional. Object with "resourceId" and "location" of the a user defined function app.') +param linkedBackend object = {} + +@description('Optional. Static site app settings.') +param appSettings object = {} + +@description('Optional. Function app settings.') +param functionAppSettings object = {} + +@description('Optional. The custom domains associated with this static site. The deployment will fail as long as the validation records are not present.') +param customDomains array = [] + var enableReferencedModulesTelemetry = false var identityType = systemAssignedIdentity ? (!empty(userAssignedIdentities) ? 'SystemAssigned,UserAssigned' : 'SystemAssigned') : (!empty(userAssignedIdentities) ? 'UserAssigned' : 'None') @@ -120,6 +132,42 @@ resource staticSite 'Microsoft.Web/staticSites@2021-03-01' = { } } +module staticSite_linkedBackend 'linkedBackends/deploy.bicep' = if (!empty(linkedBackend)) { + name: '${uniqueString(deployment().name, location)}-StaticSite-UserDefinedFunction' + params: { + staticSiteName: staticSite.name + backendResourceId: linkedBackend.resourceId + region: contains(linkedBackend, 'location') ? linkedBackend.location : location + } +} + +module staticSite_appSettings 'config/deploy.bicep' = if (!empty(appSettings)) { + name: '${uniqueString(deployment().name, location)}-StaticSite-appSettings' + params: { + kind: 'appsettings' + staticSiteName: staticSite.name + properties: appSettings + } +} + +module staticSite_functionAppSettings 'config/deploy.bicep' = if (!empty(functionAppSettings)) { + name: '${uniqueString(deployment().name, location)}-StaticSite-functionAppSettings' + params: { + kind: 'functionappsettings' + staticSiteName: staticSite.name + properties: functionAppSettings + } +} + +module staticSite_customDomains 'customDomains/deploy.bicep' = [for (customDomain, index) in customDomains: { + name: '${uniqueString(deployment().name, location)}-StaticSite-customDomains-${index}' + params: { + name: customDomain + staticSiteName: staticSite.name + validationMethod: indexOf(customDomain, '.') == lastIndexOf(customDomain, '.') ? 'dns-txt-token' : 'cname-delegation' + } +}] + resource staticSite_lock 'Microsoft.Authorization/locks@2017-04-01' = if (!empty(lock)) { name: '${staticSite.name}-${lock}-lock' properties: { diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep new file mode 100644 index 0000000000..9f99f31843 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep @@ -0,0 +1,33 @@ +@description('Requried. The resource id of the backend linked to the static site.') +param backendResourceId string + +@description('Optional. The region of the backend linked to the static site.') +param region string = resourceGroup().location + +@description('Conditional. The name of the parent Static Web App. Required if the template is used in a standalone deployment.') +param staticSiteName string + +@description('Optional. Name of the backend to link to the static site.') +param linkedBackendName string = uniqueString(backendResourceId) + +resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { + name: staticSiteName +} + +resource linkedBackend 'Microsoft.Web/staticSites/linkedBackends@2022-03-01' = { + name: linkedBackendName + parent: staticSite + properties: { + backendResourceId: backendResourceId + region: region + } +} + +@description('The name of the static site.') +output name string = linkedBackend.name + +@description('The resource ID of the static site.') +output resourceId string = linkedBackend.id + +@description('The resource group the static site was deployed into.') +output resourceGroupName string = resourceGroup().name diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md new file mode 100644 index 0000000000..c727338ef3 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md @@ -0,0 +1,42 @@ +# Static Site Linked Backend `[Microsoft.Web/staticSites/linkedBackends]` + +This module deploys a Custom Function App into a Static Site using the linkedBackends property. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | + +## Parameters + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `linkedBackendName` | string | `[uniqueString(parameters('backendResourceId'))]` | Name of the backend to link to the static site. | +| `region` | string | `[resourceGroup().location]` | The region of the backend linked to the static site. | + +**Requried parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `backendResourceId` | string | The resource id of the backend linked to the static site. | + + +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the static site. | +| `resourceGroupName` | string | The resource group the static site was deployed into. | +| `resourceId` | string | The resource ID of the static site. | diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/version.json b/modules/Microsoft.Web/staticSites/linkedBackends/version.json new file mode 100644 index 0000000000..d52c7d0010 --- /dev/null +++ b/modules/Microsoft.Web/staticSites/linkedBackends/version.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", + "version": "0.6" +} diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index 52ed72ed41..4055cb2a58 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -1,408 +1,455 @@ -# Static Web Sites `[Microsoft.Web/staticSites]` - -This module deploys a Static Web Site. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) -- [Deployment examples](#Deployment-examples) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) | -| `Microsoft.Authorization/roleAssignments` | [2020-10-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-10-01-preview/roleAssignments) | -| `Microsoft.Network/privateEndpoints` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints) | -| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints/privateDnsZoneGroups) | -| `Microsoft.Web/staticSites` | [2021-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2021-03-01/staticSites) | - -## Parameters - -**Required parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | Name of the static site. | - -**Optional parameters** -| Parameter Name | Type | Default Value | Allowed Values | Description | -| :-- | :-- | :-- | :-- | :-- | -| `allowConfigFileUpdates` | bool | `True` | | If config file is locked for this static web app. | -| `branch` | string | `''` | | The branch name of the GitHub repo. | -| `buildProperties` | object | `{object}` | | Build properties for the static site. | -| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | -| `enterpriseGradeCdnStatus` | string | `'Disabled'` | `[Disabled, Disabling, Enabled, Enabling]` | State indicating the status of the enterprise grade CDN serving traffic to the static web app. | -| `location` | string | `[resourceGroup().location]` | | Location to deploy static site. The following locations are supported: CentralUS, EastUS2, EastAsia, WestEurope, WestUS2. | -| `lock` | string | `''` | `[, CanNotDelete, ReadOnly]` | Specify the type of lock. | -| `privateEndpoints` | array | `[]` | | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. | -| `provider` | string | `'None'` | | The provider that submitted the last deployment to the primary environment of the static site. | -| `repositoryToken` | secureString | `''` | | The Personal Access Token for accessing the GitHub repo. | -| `repositoryUrl` | string | `''` | | The name of the GitHub repo. | -| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | -| `sku` | string | `'Free'` | `[Free, Standard]` | Type of static site to deploy. | -| `stagingEnvironmentPolicy` | string | `'Enabled'` | `[Enabled, Disabled]` | State indicating whether staging environments are allowed or not allowed for a static web app. | -| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. | -| `tags` | object | `{object}` | | Tags of the resource. | -| `templateProperties` | object | `{object}` | | Template Options for the static site. | -| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. | - - -### Parameter Usage: `privateEndpoints` - -To use Private Endpoint the following dependencies must be deployed: - -- Destination subnet must be created with the following configuration option - `"privateEndpointNetworkPolicies": "Disabled"`. Setting this option acknowledges that NSG rules are not applied to Private Endpoints (this capability is coming soon). A full example is available in the Virtual Network Module. -- Although not strictly required, it is highly recommended to first create a private DNS Zone to host Private Endpoint DNS records. See [Azure Private Endpoint DNS configuration](https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns) for more information. - -
- -Parameter JSON format - -```json -"privateEndpoints": { - "value": [ - // Example showing all available fields - { - "name": "sxx-az-pe", // Optional: Name will be automatically generated if one is not provided here - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", - "service": "<>", // e.g. vault, registry, file, blob, queue, table etc. - "privateDnsZoneResourceIds": [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified - "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net" - ], - "customDnsConfigs": [ // Optional - { - "fqdn": "customname.test.local", - "ipAddresses": [ - "10.10.10.10" - ] - } - ] - }, - // Example showing only mandatory fields - { - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", - "service": "<>" // e.g. vault, registry, file, blob, queue, table etc. - } - ] -} -``` - -
- -
- -Bicep format - -```bicep -privateEndpoints: [ - // Example showing all available fields - { - name: 'sxx-az-pe' // Optional: Name will be automatically generated if one is not provided here - subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' - service: '<>' // e.g. vault registry file blob queue table etc. - privateDnsZoneResourceIds: [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified - '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net' - ] - // Optional - customDnsConfigs: [ - { - fqdn: 'customname.test.local' - ipAddresses: [ - '10.10.10.10' - ] - } - ] - } - // Example showing only mandatory fields - { - subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' - service: '<>' // e.g. vault registry file blob queue table etc. - } -] -``` - -
-

- -### Parameter Usage: `roleAssignments` - -Create a role assignment for the given resource. If you want to assign a service principal / managed identity that is created in the same deployment, make sure to also specify the `'principalType'` parameter and set it to `'ServicePrincipal'`. This will ensure the role assignment waits for the principal's propagation in Azure. - -

- -Parameter JSON format - -```json -"roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "description": "Reader Role Assignment", - "principalIds": [ - "12345678-1234-1234-1234-123456789012", // object 1 - "78945612-1234-1234-1234-123456789012" // object 2 - ] - }, - { - "roleDefinitionIdOrName": "/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11", - "principalIds": [ - "12345678-1234-1234-1234-123456789012" // object 1 - ], - "principalType": "ServicePrincipal" - } - ] -} -``` - -
- -
- -Bicep format - -```bicep -roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - description: 'Reader Role Assignment' - principalIds: [ - '12345678-1234-1234-1234-123456789012' // object 1 - '78945612-1234-1234-1234-123456789012' // object 2 - ] - } - { - roleDefinitionIdOrName: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' - principalIds: [ - '12345678-1234-1234-1234-123456789012' // object 1 - ] - principalType: 'ServicePrincipal' - } -] -``` - -
-

- -### Parameter Usage: `tags` - -Tag names and tag values can be provided as needed. A tag can be left without a value. - -

- -Parameter JSON format - -```json -"tags": { - "value": { - "Environment": "Non-Prod", - "Contact": "test.user@testcompany.com", - "PurchaseOrder": "1234", - "CostCenter": "7890", - "ServiceName": "DeploymentValidation", - "Role": "DeploymentValidation" - } -} -``` - -
- -
- -Bicep format - -```bicep -tags: { - Environment: 'Non-Prod' - Contact: 'test.user@testcompany.com' - PurchaseOrder: '1234' - CostCenter: '7890' - ServiceName: 'DeploymentValidation' - Role: 'DeploymentValidation' -} -``` - -
-

- -### Parameter Usage: `userAssignedIdentities` - -You can specify multiple user assigned identities to a resource by providing additional resource IDs using the following format: - -

- -Parameter JSON format - -```json -"userAssignedIdentities": { - "value": { - "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001": {}, - "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002": {} - } -} -``` - -
- -
- -Bicep format - -```bicep -userAssignedIdentities: { - '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001': {} - '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002': {} -} -``` - -
-

- -## Outputs - -| Output Name | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the static site. | -| `resourceGroupName` | string | The resource group the static site was deployed into. | -| `resourceId` | string | The resource ID of the static site. | -| `systemAssignedPrincipalId` | string | The principal ID of the system assigned identity. | - -## Deployment examples - -

Example 1

- -
- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-min-001" - } - } -} -``` - -
- -
- -via Bicep module - -```bicep -module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-staticSites' - params: { - name: '<>-az-wss-min-001' - } -} -``` - -
-

- -

Example 2

- -
- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-x-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "sku": { - "value": "Standard" - }, - "stagingEnvironmentPolicy": { - "value": "Enabled" - }, - "allowConfigFileUpdates": { - "value": true - }, - "enterpriseGradeCdnStatus": { - "value": "Disabled" - }, - "systemAssignedIdentity": { - "value": true - }, - "userAssignedIdentities": { - "value": { - "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} - } - }, - "roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "principalIds": [ - "<>" - ] - } - ] - }, - "privateEndpoints": { - "value": [ - { - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", - "service": "staticSites" - } - ] - } - } -} -``` - -
- -
- -via Bicep module - -```bicep -module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-staticSites' - params: { - name: '<>-az-wss-x-001' - lock: 'CanNotDelete' - sku: 'Standard' - stagingEnvironmentPolicy: 'Enabled' - allowConfigFileUpdates: true - enterpriseGradeCdnStatus: 'Disabled' - systemAssignedIdentity: true - userAssignedIdentities: { - '/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001': {} - } - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalIds: [ - '<>' - ] - } - ] - privateEndpoints: [ - { - subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints' - service: 'staticSites' - } - ] - } -} -``` - -
-

+# Static Web Sites `[Microsoft.Web/staticSites]` + +This module deploys a Static Web Site. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) +- [Deployment examples](#Deployment-examples) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) | +| `Microsoft.Authorization/roleAssignments` | [2020-10-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-10-01-preview/roleAssignments) | +| `Microsoft.Network/privateEndpoints` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints) | +| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints/privateDnsZoneGroups) | +| `Microsoft.Web/staticSites` | [2021-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2021-03-01/staticSites) | +| `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | +| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | +| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | Name of the static site. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Allowed Values | Description | +| :-- | :-- | :-- | :-- | :-- | +| `allowConfigFileUpdates` | bool | `True` | | False if config file is locked for this static web app; otherwise, true. | +| `appSettings` | object | `{object}` | | Static site app settings. | +| `branch` | string | `''` | | The branch name of the GitHub repo. | +| `buildProperties` | object | `{object}` | | Build properties for the static site. | +| `customDomains` | _[customDomains](customDomains/readme.md)_ array | `[]` | | The custom domains associated with this static site. The deployment will fail as long as the validation records are not present. | +| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `enterpriseGradeCdnStatus` | string | `'Disabled'` | `[Disabled, Disabling, Enabled, Enabling]` | State indicating the status of the enterprise grade CDN serving traffic to the static web app. | +| `functionAppSettings` | object | `{object}` | | Function app settings. | +| `linkedBackend` | object | `{object}` | | Object with "resourceId" and "location" of the a user defined function app. | +| `location` | string | `[resourceGroup().location]` | | Location to deploy static site. The following locations are supported: CentralUS, EastUS2, EastAsia, WestEurope, WestUS2. | +| `lock` | string | `''` | `[, CanNotDelete, ReadOnly]` | Specify the type of lock. | +| `privateEndpoints` | array | `[]` | | Configuration details for private endpoints. | +| `provider` | string | `'None'` | | The provider that submitted the last deployment to the primary environment of the static site. | +| `repositoryToken` | secureString | `''` | | The Personal Access Token for accessing the GitHub repo. | +| `repositoryUrl` | string | `''` | | The name of the GitHub repo. | +| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | +| `sku` | string | `'Free'` | `[Free, Standard]` | Type of static site to deploy. | +| `stagingEnvironmentPolicy` | string | `'Enabled'` | `[Enabled, Disabled]` | State indicating whether staging environments are allowed or not allowed for a static web app. | +| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. | +| `tags` | object | `{object}` | | Tags of the resource. | +| `templateProperties` | object | `{object}` | | Template Options for the static site. | +| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. | + + +### Parameter Usage: `privateEndpoints` + +To use Private Endpoint the following dependencies must be deployed: + +- Destination subnet must be created with the following configuration option - `"privateEndpointNetworkPolicies": "Disabled"`. Setting this option acknowledges that NSG rules are not applied to Private Endpoints (this capability is coming soon). A full example is available in the Virtual Network Module. +- Although not strictly required, it is highly recommended to first create a private DNS Zone to host Private Endpoint DNS records. See [Azure Private Endpoint DNS configuration](https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns) for more information. + +

+ +Parameter JSON format + +```json +"privateEndpoints": { + "value": [ + // Example showing all available fields + { + "name": "sxx-az-pe", // Optional: Name will be automatically generated if one is not provided here + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", + "service": "<>", // e.g. vault, registry, file, blob, queue, table etc. + "privateDnsZoneResourceIds": [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified + "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net" + ], + "customDnsConfigs": [ // Optional + { + "fqdn": "customname.test.local", + "ipAddresses": [ + "10.10.10.10" + ] + } + ] + }, + // Example showing only mandatory fields + { + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", + "service": "<>" // e.g. vault, registry, file, blob, queue, table etc. + } + ] +} +``` + +
+ +
+ +Bicep format + +```bicep +privateEndpoints: [ + // Example showing all available fields + { + name: 'sxx-az-pe' // Optional: Name will be automatically generated if one is not provided here + subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' + service: '<>' // e.g. vault registry file blob queue table etc. + privateDnsZoneResourceIds: [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified + '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net' + ] + // Optional + customDnsConfigs: [ + { + fqdn: 'customname.test.local' + ipAddresses: [ + '10.10.10.10' + ] + } + ] + } + // Example showing only mandatory fields + { + subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' + service: '<>' // e.g. vault registry file blob queue table etc. + } +] +``` + +
+

+ +### Parameter Usage: `roleAssignments` + +Create a role assignment for the given resource. If you want to assign a service principal / managed identity that is created in the same deployment, make sure to also specify the `'principalType'` parameter and set it to `'ServicePrincipal'`. This will ensure the role assignment waits for the principal's propagation in Azure. + +

+ +Parameter JSON format + +```json +"roleAssignments": { + "value": [ + { + "roleDefinitionIdOrName": "Reader", + "description": "Reader Role Assignment", + "principalIds": [ + "12345678-1234-1234-1234-123456789012", // object 1 + "78945612-1234-1234-1234-123456789012" // object 2 + ] + }, + { + "roleDefinitionIdOrName": "/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11", + "principalIds": [ + "12345678-1234-1234-1234-123456789012" // object 1 + ], + "principalType": "ServicePrincipal" + } + ] +} +``` + +
+ +
+ +Bicep format + +```bicep +roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + description: 'Reader Role Assignment' + principalIds: [ + '12345678-1234-1234-1234-123456789012' // object 1 + '78945612-1234-1234-1234-123456789012' // object 2 + ] + } + { + roleDefinitionIdOrName: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' + principalIds: [ + '12345678-1234-1234-1234-123456789012' // object 1 + ] + principalType: 'ServicePrincipal' + } +] +``` + +
+

+ +### Parameter Usage: `tags` + +Tag names and tag values can be provided as needed. A tag can be left without a value. + +

+ +Parameter JSON format + +```json +"tags": { + "value": { + "Environment": "Non-Prod", + "Contact": "test.user@testcompany.com", + "PurchaseOrder": "1234", + "CostCenter": "7890", + "ServiceName": "DeploymentValidation", + "Role": "DeploymentValidation" + } +} +``` + +
+ +
+ +Bicep format + +```bicep +tags: { + Environment: 'Non-Prod' + Contact: 'test.user@testcompany.com' + PurchaseOrder: '1234' + CostCenter: '7890' + ServiceName: 'DeploymentValidation' + Role: 'DeploymentValidation' +} +``` + +
+

+ +### Parameter Usage: `userAssignedIdentities` + +You can specify multiple user assigned identities to a resource by providing additional resource IDs using the following format: + +

+ +Parameter JSON format + +```json +"userAssignedIdentities": { + "value": { + "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001": {}, + "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002": {} + } +} +``` + +
+ +
+ +Bicep format + +```bicep +userAssignedIdentities: { + '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001': {} + '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002': {} +} +``` + +
+

+ +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | +| `name` | string | The name of the static site. | +| `resourceGroupName` | string | The resource group the static site was deployed into. | +| `resourceId` | string | The resource ID of the static site. | +| `systemAssignedPrincipalId` | string | The principal ID of the system assigned identity. | + +## Deployment examples + +

Example 1

+ +
+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-min-001" + } + } +} +``` + +
+ +
+ +via Bicep module + +```bicep +module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-staticSites' + params: { + name: '<>-az-wss-min-001' + } +} +``` + +
+

+ +

Example 2

+ +
+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-x-001" + }, + "lock": { + "value": "CanNotDelete" + }, + "sku": { + "value": "Standard" + }, + "stagingEnvironmentPolicy": { + "value": "Enabled" + }, + "allowConfigFileUpdates": { + "value": true + }, + "enterpriseGradeCdnStatus": { + "value": "Disabled" + }, + "systemAssignedIdentity": { + "value": true + }, + "customDomains": { + "value": [ + "<>domain1.domain", + "<>domain2.domain.domain", + "<>domain3.domain.domain.domain" + ] + }, + "appSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "functionAppSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "userAssignedIdentities": { + "value": { + "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} + } + }, + "roleAssignments": { + "value": [ + { + "roleDefinitionIdOrName": "Reader", + "principalIds": [ + "<>" + ] + } + ] + }, + "privateEndpoints": { + "value": [ + { + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", + "service": "staticSites" + } + ] + }, + "linkedBackend": { + "value": { + "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001" + } + } + } +} +``` + +
+ +
+ +via Bicep module + +```bicep +module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-staticSites' + params: { + name: '<>-az-wss-x-001' + lock: 'CanNotDelete' + sku: 'Standard' + stagingEnvironmentPolicy: 'Enabled' + allowConfigFileUpdates: true + enterpriseGradeCdnStatus: 'Disabled' + systemAssignedIdentity: true + customDomains: [ + '<>domain1.domain' + '<>domain2.domain.domain' + '<>domain3.domain.domain.domain' + ] + appSettings: { + foo: 'bar' + setting: 1 + } + functionAppSettings: { + foo: 'bar' + setting: 1 + } + userAssignedIdentities: { + '/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001': {} + } + roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + principalIds: [ + '<>' + ] + } + ] + privateEndpoints: [ + { + subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints' + service: 'staticSites' + } + ] + linkedBackend: { + resourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001' + } + } +} +``` + +
+

diff --git a/modules/Microsoft.Web/staticSites/version.json b/modules/Microsoft.Web/staticSites/version.json index 41f66cc990..d52c7d0010 100644 --- a/modules/Microsoft.Web/staticSites/version.json +++ b/modules/Microsoft.Web/staticSites/version.json @@ -1,4 +1,4 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", - "version": "0.1" + "version": "0.6" } From 5d3133b12a31c634b40b860bcab817c27a1d733d Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 10:37:12 +0200 Subject: [PATCH 03/27] Update to latest --- .../.test/gremlindb.parameters.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json b/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json index a930d2ed3a..ec025620b5 100644 --- a/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json +++ b/modules/Microsoft.DocumentDB/databaseAccounts/.test/gremlindb.parameters.json @@ -3,7 +3,7 @@ "contentVersion": "1.0.0.0", "parameters": { "name": { - "value": "carml-az-cdb-gremlindb-001" + "value": "<>-az-cdb-gremlindb-001" }, "location": { "value": "West Europe" @@ -32,7 +32,7 @@ { "roleDefinitionIdOrName": "Reader", "principalIds": [ - "e58511af-4da2-449c-a5cd-6a10271cfb83" + "<>" ] } ] @@ -40,7 +40,7 @@ "gremlinDatabases": { "value": [ { - "name": "carml-az-gdb-x-001", + "name": "<>-az-gdb-x-001", "graphs": [ { "name": "car_collection", @@ -59,7 +59,7 @@ ] }, { - "name": "carml-az-gdb-x-002", + "name": "<>-az-gdb-x-002", "collections": [ { "name": "bike_collection", @@ -83,16 +83,16 @@ "value": 7 }, "diagnosticStorageAccountId": { - "value": "/subscriptions/a7439831-1cd9-435d-a091-4aa863c96556/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adpcarmlazsax001" + "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Storage/storageAccounts/adp<>azsax001" }, "diagnosticWorkspaceId": { - "value": "/subscriptions/a7439831-1cd9-435d-a091-4aa863c96556/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-carml-az-law-x-001" + "value": "/subscriptions/<>/resourcegroups/validation-rg/providers/microsoft.operationalinsights/workspaces/adp-<>-az-law-x-001" }, "diagnosticEventHubAuthorizationRuleId": { - "value": "/subscriptions/a7439831-1cd9-435d-a091-4aa863c96556/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-carml-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" + "value": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.EventHub/namespaces/adp-<>-az-evhns-x-001/AuthorizationRules/RootManageSharedAccessKey" }, "diagnosticEventHubName": { - "value": "adp-carml-az-evh-x-001" + "value": "adp-<>-az-evh-x-001" }, "systemAssignedIdentity": { "value": true From d42262e7f5922932d1c4919e3cca5f27981fa51a Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 10:47:09 +0200 Subject: [PATCH 04/27] Updated docs --- modules/Microsoft.Web/staticSites/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index 4055cb2a58..a66df2382a 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -43,7 +43,7 @@ This module deploys a Static Web Site. | `linkedBackend` | object | `{object}` | | Object with "resourceId" and "location" of the a user defined function app. | | `location` | string | `[resourceGroup().location]` | | Location to deploy static site. The following locations are supported: CentralUS, EastUS2, EastAsia, WestEurope, WestUS2. | | `lock` | string | `''` | `[, CanNotDelete, ReadOnly]` | Specify the type of lock. | -| `privateEndpoints` | array | `[]` | | Configuration details for private endpoints. | +| `privateEndpoints` | array | `[]` | | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. | | `provider` | string | `'None'` | | The provider that submitted the last deployment to the primary environment of the static site. | | `repositoryToken` | secureString | `''` | | The Personal Access Token for accessing the GitHub repo. | | `repositoryUrl` | string | `''` | | The name of the GitHub repo. | From d55c93bb87f2458bf6f45a28899bbbfc6fe15f6e Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 11:03:58 +0200 Subject: [PATCH 05/27] Updated telemetry & docs --- .../staticSites/config/deploy.bicep | 23 ++++++++++++++++--- .../staticSites/config/readme.md | 8 ++++++- .../staticSites/customDomains/deploy.bicep | 18 +++++++++++++++ .../staticSites/customDomains/readme.md | 2 ++ .../Microsoft.Web/staticSites/deploy.bicep | 10 +++++--- .../staticSites/linkedBackends/deploy.bicep | 22 ++++++++++++++++-- .../staticSites/linkedBackends/readme.md | 4 +++- modules/Microsoft.Web/staticSites/readme.md | 2 +- 8 files changed, 78 insertions(+), 11 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/config/deploy.bicep b/modules/Microsoft.Web/staticSites/config/deploy.bicep index 453d5922be..d61acbfda5 100644 --- a/modules/Microsoft.Web/staticSites/config/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/config/deploy.bicep @@ -9,10 +9,16 @@ param kind string param properties object @description('Conditional. The name of the parent Static Web App. Required if the template is used in a standalone deployment.') -param staticSiteName string +param name string + +@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') +param enableDefaultTelemetry bool = true + +@description('Optional. Location for all resources.') +param location string = resourceGroup().location resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { - name: staticSiteName + name: name } resource config 'Microsoft.Web/staticSites/config@2022-03-01' = { @@ -22,6 +28,18 @@ resource config 'Microsoft.Web/staticSites/config@2022-03-01' = { properties: properties } +resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { + name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' + properties: { + mode: 'Incremental' + template: { + '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' + contentVersion: '1.0.0.0' + resources: [] + } + } +} + @description('The name of the config.') output name string = config.name @@ -30,4 +48,3 @@ output resourceId string = config.id @description('The name of the resource group the config was created in.') output resourceGroupName string = resourceGroup().name - diff --git a/modules/Microsoft.Web/staticSites/config/readme.md b/modules/Microsoft.Web/staticSites/config/readme.md index 9ec0d83799..e3fea6c241 100644 --- a/modules/Microsoft.Web/staticSites/config/readme.md +++ b/modules/Microsoft.Web/staticSites/config/readme.md @@ -25,7 +25,13 @@ This module deploys a Static Site Config. **Conditional parameters** | Parameter Name | Type | Description | | :-- | :-- | :-- | -| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | +| `name` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `location` | string | `[resourceGroup().location]` | Location for all resources. | ## Outputs diff --git a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep index bd6ad9d005..262f4f87b9 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep @@ -7,6 +7,12 @@ param staticSiteName string @description('Optional. Validation method for adding a custom domain.') param validationMethod string = 'cname-delegation' +@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') +param enableDefaultTelemetry bool = true + +@description('Optional. Location for all resources.') +param location string = resourceGroup().location + resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { name: staticSiteName } @@ -19,6 +25,18 @@ resource customDomain 'Microsoft.Web/staticSites/customDomains@2022-03-01' = { } } +resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { + name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' + properties: { + mode: 'Incremental' + template: { + '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' + contentVersion: '1.0.0.0' + resources: [] + } + } +} + @description('The name of the static site.') output name string = customDomain.name diff --git a/modules/Microsoft.Web/staticSites/customDomains/readme.md b/modules/Microsoft.Web/staticSites/customDomains/readme.md index 8c2307e642..a098dfde87 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/readme.md +++ b/modules/Microsoft.Web/staticSites/customDomains/readme.md @@ -25,6 +25,8 @@ This module deploys a Custom Domain into a Static Site. **Optional parameters** | Parameter Name | Type | Default Value | Description | | :-- | :-- | :-- | :-- | +| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `location` | string | `[resourceGroup().location]` | Location for all resources. | | `validationMethod` | string | `'cname-delegation'` | Validation method for adding a custom domain. | diff --git a/modules/Microsoft.Web/staticSites/deploy.bicep b/modules/Microsoft.Web/staticSites/deploy.bicep index 116eb2de02..76eb808605 100644 --- a/modules/Microsoft.Web/staticSites/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/deploy.bicep @@ -13,7 +13,7 @@ param sku string = 'Free' @description('Optional. False if config file is locked for this static web app; otherwise, true.') param allowConfigFileUpdates bool = true -@description('Optional. Location to deploy static site. The following locations are supported: CentralUS, EastUS2, EastAsia, WestEurope, WestUS2.') +@description('Optional. Location for all resources.') param location string = resourceGroup().location @allowed([ @@ -138,6 +138,7 @@ module staticSite_linkedBackend 'linkedBackends/deploy.bicep' = if (!empty(linke staticSiteName: staticSite.name backendResourceId: linkedBackend.resourceId region: contains(linkedBackend, 'location') ? linkedBackend.location : location + enableDefaultTelemetry: enableReferencedModulesTelemetry } } @@ -145,8 +146,9 @@ module staticSite_appSettings 'config/deploy.bicep' = if (!empty(appSettings)) { name: '${uniqueString(deployment().name, location)}-StaticSite-appSettings' params: { kind: 'appsettings' - staticSiteName: staticSite.name + name: staticSite.name properties: appSettings + enableDefaultTelemetry: enableReferencedModulesTelemetry } } @@ -154,8 +156,9 @@ module staticSite_functionAppSettings 'config/deploy.bicep' = if (!empty(functio name: '${uniqueString(deployment().name, location)}-StaticSite-functionAppSettings' params: { kind: 'functionappsettings' - staticSiteName: staticSite.name + name: staticSite.name properties: functionAppSettings + enableDefaultTelemetry: enableReferencedModulesTelemetry } } @@ -165,6 +168,7 @@ module staticSite_customDomains 'customDomains/deploy.bicep' = [for (customDomai name: customDomain staticSiteName: staticSite.name validationMethod: indexOf(customDomain, '.') == lastIndexOf(customDomain, '.') ? 'dns-txt-token' : 'cname-delegation' + enableDefaultTelemetry: enableReferencedModulesTelemetry } }] diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep index 9f99f31843..6944f90a68 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep @@ -8,14 +8,20 @@ param region string = resourceGroup().location param staticSiteName string @description('Optional. Name of the backend to link to the static site.') -param linkedBackendName string = uniqueString(backendResourceId) +param name string = uniqueString(backendResourceId) + +@description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') +param enableDefaultTelemetry bool = true + +@description('Optional. Location for all resources.') +param location string = resourceGroup().location resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { name: staticSiteName } resource linkedBackend 'Microsoft.Web/staticSites/linkedBackends@2022-03-01' = { - name: linkedBackendName + name: name parent: staticSite properties: { backendResourceId: backendResourceId @@ -23,6 +29,18 @@ resource linkedBackend 'Microsoft.Web/staticSites/linkedBackends@2022-03-01' = { } } +resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { + name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' + properties: { + mode: 'Incremental' + template: { + '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' + contentVersion: '1.0.0.0' + resources: [] + } + } +} + @description('The name of the static site.') output name string = linkedBackend.name diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md index c727338ef3..28e6c01cf7 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md +++ b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md @@ -24,7 +24,9 @@ This module deploys a Custom Function App into a Static Site using the linkedBac **Optional parameters** | Parameter Name | Type | Default Value | Description | | :-- | :-- | :-- | :-- | -| `linkedBackendName` | string | `[uniqueString(parameters('backendResourceId'))]` | Name of the backend to link to the static site. | +| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `location` | string | `[resourceGroup().location]` | Location for all resources. | +| `name` | string | `[uniqueString(parameters('backendResourceId'))]` | Name of the backend to link to the static site. | | `region` | string | `[resourceGroup().location]` | The region of the backend linked to the static site. | **Requried parameters** diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index a66df2382a..b23b9b7145 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -41,7 +41,7 @@ This module deploys a Static Web Site. | `enterpriseGradeCdnStatus` | string | `'Disabled'` | `[Disabled, Disabling, Enabled, Enabling]` | State indicating the status of the enterprise grade CDN serving traffic to the static web app. | | `functionAppSettings` | object | `{object}` | | Function app settings. | | `linkedBackend` | object | `{object}` | | Object with "resourceId" and "location" of the a user defined function app. | -| `location` | string | `[resourceGroup().location]` | | Location to deploy static site. The following locations are supported: CentralUS, EastUS2, EastAsia, WestEurope, WestUS2. | +| `location` | string | `[resourceGroup().location]` | | Location for all resources. | | `lock` | string | `''` | `[, CanNotDelete, ReadOnly]` | Specify the type of lock. | | `privateEndpoints` | array | `[]` | | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. | | `provider` | string | `'None'` | | The provider that submitted the last deployment to the primary environment of the static site. | From 4689ff98dfa79beef860a3b9c2a4a50fd0e4e327 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 11:27:01 +0200 Subject: [PATCH 06/27] Minor fix --- modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep | 2 +- modules/Microsoft.Web/staticSites/linkedBackends/readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep index 6944f90a68..6199d5ead1 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep @@ -1,4 +1,4 @@ -@description('Requried. The resource id of the backend linked to the static site.') +@description('Required. The resource id of the backend linked to the static site.') param backendResourceId string @description('Optional. The region of the backend linked to the static site.') diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md index 28e6c01cf7..7b3a695f7f 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md +++ b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md @@ -29,7 +29,7 @@ This module deploys a Custom Function App into a Static Site using the linkedBac | `name` | string | `[uniqueString(parameters('backendResourceId'))]` | Name of the backend to link to the static site. | | `region` | string | `[resourceGroup().location]` | The region of the backend linked to the static site. | -**Requried parameters** +**Required parameters** | Parameter Name | Type | Description | | :-- | :-- | :-- | | `backendResourceId` | string | The resource id of the backend linked to the static site. | From c3639d825d0929c8f4d783d3cd639a220c789f3b Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 11:29:14 +0200 Subject: [PATCH 07/27] Regenerated main readme --- modules/Microsoft.Web/staticSites/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index b23b9b7145..bdf6876a73 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -1,4 +1,4 @@ -# Static Web Sites `[Microsoft.Web/staticSites]` +# Static Site `[Microsoft.Web/staticSites]` This module deploys a Static Web Site. From e8332fae1ffc1ddec2f06c4e2a62331cd5535e2d Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 11:42:56 +0200 Subject: [PATCH 08/27] Another try --- modules/Microsoft.Web/staticSites/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index bdf6876a73..b23b9b7145 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -1,4 +1,4 @@ -# Static Site `[Microsoft.Web/staticSites]` +# Static Web Sites `[Microsoft.Web/staticSites]` This module deploys a Static Web Site. From 4f3b7b80cf17b6b7f27e072b822c7dcc66c7dd62 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Tue, 12 Jul 2022 17:35:38 +0200 Subject: [PATCH 09/27] Updated files on linux --- .../staticSites/config/readme.md | 86 +- .../staticSites/customDomains/readme.md | 78 +- .../staticSites/linkedBackends/readme.md | 88 +- modules/Microsoft.Web/staticSites/readme.md | 910 +++++++++--------- 4 files changed, 581 insertions(+), 581 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/config/readme.md b/modules/Microsoft.Web/staticSites/config/readme.md index e3fea6c241..99ebf6ddfc 100644 --- a/modules/Microsoft.Web/staticSites/config/readme.md +++ b/modules/Microsoft.Web/staticSites/config/readme.md @@ -1,43 +1,43 @@ -# Static Site Config `[Microsoft.Web/staticSites/config]` - -This module deploys a Static Site Config. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | - -## Parameters - -**Required parameters** -| Parameter Name | Type | Allowed Values | Description | -| :-- | :-- | :-- | :-- | -| `kind` | string | `[appsettings, functionappsettings]` | Type of settings to apply. | -| `properties` | object | | App settings. | - -**Conditional parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | - -**Optional parameters** -| Parameter Name | Type | Default Value | Description | -| :-- | :-- | :-- | :-- | -| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | -| `location` | string | `[resourceGroup().location]` | Location for all resources. | - - -## Outputs - -| Output Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | The name of the config. | -| `resourceGroupName` | string | The name of the resource group the config was created in. | -| `resourceId` | string | The resource ID of the config. | +# Static Site Config `[Microsoft.Web/staticSites/config]` + +This module deploys a Static Site Config. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Allowed Values | Description | +| :-- | :-- | :-- | :-- | +| `kind` | string | `[appsettings, functionappsettings]` | Type of settings to apply. | +| `properties` | object | | App settings. | + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `location` | string | `[resourceGroup().location]` | Location for all resources. | + + +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the config. | +| `resourceGroupName` | string | The name of the resource group the config was created in. | +| `resourceId` | string | The resource ID of the config. | diff --git a/modules/Microsoft.Web/staticSites/customDomains/readme.md b/modules/Microsoft.Web/staticSites/customDomains/readme.md index a098dfde87..b118513150 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/readme.md +++ b/modules/Microsoft.Web/staticSites/customDomains/readme.md @@ -1,39 +1,39 @@ -# Static Site Custom Domain `[Microsoft.Web/staticSites/customDomains]` - -This module deploys a Custom Domain into a Static Site. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | - -## Parameters - -**Conditional parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | The custom domain name. Required if the template is used in a standalone deployment. | -| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | - -**Optional parameters** -| Parameter Name | Type | Default Value | Description | -| :-- | :-- | :-- | :-- | -| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | -| `location` | string | `[resourceGroup().location]` | Location for all resources. | -| `validationMethod` | string | `'cname-delegation'` | Validation method for adding a custom domain. | - - -## Outputs - -| Output Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | The name of the static site. | -| `resourceGroupName` | string | The resource group the static site was deployed into. | -| `resourceId` | string | The resource ID of the static site. | +# Static Site Custom Domain `[Microsoft.Web/staticSites/customDomains]` + +This module deploys a Custom Domain into a Static Site. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | + +## Parameters + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The custom domain name. Required if the template is used in a standalone deployment. | +| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `location` | string | `[resourceGroup().location]` | Location for all resources. | +| `validationMethod` | string | `'cname-delegation'` | Validation method for adding a custom domain. | + + +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the static site. | +| `resourceGroupName` | string | The resource group the static site was deployed into. | +| `resourceId` | string | The resource ID of the static site. | diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md index 7b3a695f7f..1020a2864d 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md +++ b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md @@ -1,44 +1,44 @@ -# Static Site Linked Backend `[Microsoft.Web/staticSites/linkedBackends]` - -This module deploys a Custom Function App into a Static Site using the linkedBackends property. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | - -## Parameters - -**Conditional parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | - -**Optional parameters** -| Parameter Name | Type | Default Value | Description | -| :-- | :-- | :-- | :-- | -| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | -| `location` | string | `[resourceGroup().location]` | Location for all resources. | -| `name` | string | `[uniqueString(parameters('backendResourceId'))]` | Name of the backend to link to the static site. | -| `region` | string | `[resourceGroup().location]` | The region of the backend linked to the static site. | - -**Required parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `backendResourceId` | string | The resource id of the backend linked to the static site. | - - -## Outputs - -| Output Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | The name of the static site. | -| `resourceGroupName` | string | The resource group the static site was deployed into. | -| `resourceId` | string | The resource ID of the static site. | +# Static Site Linked Backend `[Microsoft.Web/staticSites/linkedBackends]` + +This module deploys a Custom Function App into a Static Site using the linkedBackends property. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `backendResourceId` | string | The resource id of the backend linked to the static site. | + +**Conditional parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Description | +| :-- | :-- | :-- | :-- | +| `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `location` | string | `[resourceGroup().location]` | Location for all resources. | +| `name` | string | `[uniqueString(parameters('backendResourceId'))]` | Name of the backend to link to the static site. | +| `region` | string | `[resourceGroup().location]` | The region of the backend linked to the static site. | + + +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | The name of the static site. | +| `resourceGroupName` | string | The resource group the static site was deployed into. | +| `resourceId` | string | The resource ID of the static site. | diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index b23b9b7145..fa20b8aa47 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -1,455 +1,455 @@ -# Static Web Sites `[Microsoft.Web/staticSites]` - -This module deploys a Static Web Site. - -## Navigation - -- [Resource Types](#Resource-Types) -- [Parameters](#Parameters) -- [Outputs](#Outputs) -- [Deployment examples](#Deployment-examples) - -## Resource Types - -| Resource Type | API Version | -| :-- | :-- | -| `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) | -| `Microsoft.Authorization/roleAssignments` | [2020-10-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-10-01-preview/roleAssignments) | -| `Microsoft.Network/privateEndpoints` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints) | -| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints/privateDnsZoneGroups) | -| `Microsoft.Web/staticSites` | [2021-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2021-03-01/staticSites) | -| `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | -| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | -| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | - -## Parameters - -**Required parameters** -| Parameter Name | Type | Description | -| :-- | :-- | :-- | -| `name` | string | Name of the static site. | - -**Optional parameters** -| Parameter Name | Type | Default Value | Allowed Values | Description | -| :-- | :-- | :-- | :-- | :-- | -| `allowConfigFileUpdates` | bool | `True` | | False if config file is locked for this static web app; otherwise, true. | -| `appSettings` | object | `{object}` | | Static site app settings. | -| `branch` | string | `''` | | The branch name of the GitHub repo. | -| `buildProperties` | object | `{object}` | | Build properties for the static site. | -| `customDomains` | _[customDomains](customDomains/readme.md)_ array | `[]` | | The custom domains associated with this static site. The deployment will fail as long as the validation records are not present. | -| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | -| `enterpriseGradeCdnStatus` | string | `'Disabled'` | `[Disabled, Disabling, Enabled, Enabling]` | State indicating the status of the enterprise grade CDN serving traffic to the static web app. | -| `functionAppSettings` | object | `{object}` | | Function app settings. | -| `linkedBackend` | object | `{object}` | | Object with "resourceId" and "location" of the a user defined function app. | -| `location` | string | `[resourceGroup().location]` | | Location for all resources. | -| `lock` | string | `''` | `[, CanNotDelete, ReadOnly]` | Specify the type of lock. | -| `privateEndpoints` | array | `[]` | | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. | -| `provider` | string | `'None'` | | The provider that submitted the last deployment to the primary environment of the static site. | -| `repositoryToken` | secureString | `''` | | The Personal Access Token for accessing the GitHub repo. | -| `repositoryUrl` | string | `''` | | The name of the GitHub repo. | -| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | -| `sku` | string | `'Free'` | `[Free, Standard]` | Type of static site to deploy. | -| `stagingEnvironmentPolicy` | string | `'Enabled'` | `[Enabled, Disabled]` | State indicating whether staging environments are allowed or not allowed for a static web app. | -| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. | -| `tags` | object | `{object}` | | Tags of the resource. | -| `templateProperties` | object | `{object}` | | Template Options for the static site. | -| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. | - - -### Parameter Usage: `privateEndpoints` - -To use Private Endpoint the following dependencies must be deployed: - -- Destination subnet must be created with the following configuration option - `"privateEndpointNetworkPolicies": "Disabled"`. Setting this option acknowledges that NSG rules are not applied to Private Endpoints (this capability is coming soon). A full example is available in the Virtual Network Module. -- Although not strictly required, it is highly recommended to first create a private DNS Zone to host Private Endpoint DNS records. See [Azure Private Endpoint DNS configuration](https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns) for more information. - -

- -Parameter JSON format - -```json -"privateEndpoints": { - "value": [ - // Example showing all available fields - { - "name": "sxx-az-pe", // Optional: Name will be automatically generated if one is not provided here - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", - "service": "<>", // e.g. vault, registry, file, blob, queue, table etc. - "privateDnsZoneResourceIds": [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified - "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net" - ], - "customDnsConfigs": [ // Optional - { - "fqdn": "customname.test.local", - "ipAddresses": [ - "10.10.10.10" - ] - } - ] - }, - // Example showing only mandatory fields - { - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", - "service": "<>" // e.g. vault, registry, file, blob, queue, table etc. - } - ] -} -``` - -
- -
- -Bicep format - -```bicep -privateEndpoints: [ - // Example showing all available fields - { - name: 'sxx-az-pe' // Optional: Name will be automatically generated if one is not provided here - subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' - service: '<>' // e.g. vault registry file blob queue table etc. - privateDnsZoneResourceIds: [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified - '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net' - ] - // Optional - customDnsConfigs: [ - { - fqdn: 'customname.test.local' - ipAddresses: [ - '10.10.10.10' - ] - } - ] - } - // Example showing only mandatory fields - { - subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' - service: '<>' // e.g. vault registry file blob queue table etc. - } -] -``` - -
-

- -### Parameter Usage: `roleAssignments` - -Create a role assignment for the given resource. If you want to assign a service principal / managed identity that is created in the same deployment, make sure to also specify the `'principalType'` parameter and set it to `'ServicePrincipal'`. This will ensure the role assignment waits for the principal's propagation in Azure. - -

- -Parameter JSON format - -```json -"roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "description": "Reader Role Assignment", - "principalIds": [ - "12345678-1234-1234-1234-123456789012", // object 1 - "78945612-1234-1234-1234-123456789012" // object 2 - ] - }, - { - "roleDefinitionIdOrName": "/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11", - "principalIds": [ - "12345678-1234-1234-1234-123456789012" // object 1 - ], - "principalType": "ServicePrincipal" - } - ] -} -``` - -
- -
- -Bicep format - -```bicep -roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - description: 'Reader Role Assignment' - principalIds: [ - '12345678-1234-1234-1234-123456789012' // object 1 - '78945612-1234-1234-1234-123456789012' // object 2 - ] - } - { - roleDefinitionIdOrName: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' - principalIds: [ - '12345678-1234-1234-1234-123456789012' // object 1 - ] - principalType: 'ServicePrincipal' - } -] -``` - -
-

- -### Parameter Usage: `tags` - -Tag names and tag values can be provided as needed. A tag can be left without a value. - -

- -Parameter JSON format - -```json -"tags": { - "value": { - "Environment": "Non-Prod", - "Contact": "test.user@testcompany.com", - "PurchaseOrder": "1234", - "CostCenter": "7890", - "ServiceName": "DeploymentValidation", - "Role": "DeploymentValidation" - } -} -``` - -
- -
- -Bicep format - -```bicep -tags: { - Environment: 'Non-Prod' - Contact: 'test.user@testcompany.com' - PurchaseOrder: '1234' - CostCenter: '7890' - ServiceName: 'DeploymentValidation' - Role: 'DeploymentValidation' -} -``` - -
-

- -### Parameter Usage: `userAssignedIdentities` - -You can specify multiple user assigned identities to a resource by providing additional resource IDs using the following format: - -

- -Parameter JSON format - -```json -"userAssignedIdentities": { - "value": { - "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001": {}, - "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002": {} - } -} -``` - -
- -
- -Bicep format - -```bicep -userAssignedIdentities: { - '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001': {} - '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002': {} -} -``` - -
-

- -## Outputs - -| Output Name | Type | Description | -| :-- | :-- | :-- | -| `location` | string | The location the resource was deployed into. | -| `name` | string | The name of the static site. | -| `resourceGroupName` | string | The resource group the static site was deployed into. | -| `resourceId` | string | The resource ID of the static site. | -| `systemAssignedPrincipalId` | string | The principal ID of the system assigned identity. | - -## Deployment examples - -

Example 1

- -
- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-min-001" - } - } -} -``` - -
- -
- -via Bicep module - -```bicep -module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-staticSites' - params: { - name: '<>-az-wss-min-001' - } -} -``` - -
-

- -

Example 2

- -
- -via JSON Parameter file - -```json -{ - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-x-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "sku": { - "value": "Standard" - }, - "stagingEnvironmentPolicy": { - "value": "Enabled" - }, - "allowConfigFileUpdates": { - "value": true - }, - "enterpriseGradeCdnStatus": { - "value": "Disabled" - }, - "systemAssignedIdentity": { - "value": true - }, - "customDomains": { - "value": [ - "<>domain1.domain", - "<>domain2.domain.domain", - "<>domain3.domain.domain.domain" - ] - }, - "appSettings": { - "value": { - "foo": "bar", - "setting": 1 - } - }, - "functionAppSettings": { - "value": { - "foo": "bar", - "setting": 1 - } - }, - "userAssignedIdentities": { - "value": { - "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} - } - }, - "roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "principalIds": [ - "<>" - ] - } - ] - }, - "privateEndpoints": { - "value": [ - { - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", - "service": "staticSites" - } - ] - }, - "linkedBackend": { - "value": { - "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001" - } - } - } -} -``` - -
- -
- -via Bicep module - -```bicep -module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { - name: '${uniqueString(deployment().name)}-staticSites' - params: { - name: '<>-az-wss-x-001' - lock: 'CanNotDelete' - sku: 'Standard' - stagingEnvironmentPolicy: 'Enabled' - allowConfigFileUpdates: true - enterpriseGradeCdnStatus: 'Disabled' - systemAssignedIdentity: true - customDomains: [ - '<>domain1.domain' - '<>domain2.domain.domain' - '<>domain3.domain.domain.domain' - ] - appSettings: { - foo: 'bar' - setting: 1 - } - functionAppSettings: { - foo: 'bar' - setting: 1 - } - userAssignedIdentities: { - '/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001': {} - } - roleAssignments: [ - { - roleDefinitionIdOrName: 'Reader' - principalIds: [ - '<>' - ] - } - ] - privateEndpoints: [ - { - subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints' - service: 'staticSites' - } - ] - linkedBackend: { - resourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001' - } - } -} -``` - -
-

+# Static Web Sites `[Microsoft.Web/staticSites]` + +This module deploys a Static Web Site. + +## Navigation + +- [Resource Types](#Resource-Types) +- [Parameters](#Parameters) +- [Outputs](#Outputs) +- [Deployment examples](#Deployment-examples) + +## Resource Types + +| Resource Type | API Version | +| :-- | :-- | +| `Microsoft.Authorization/locks` | [2017-04-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2017-04-01/locks) | +| `Microsoft.Authorization/roleAssignments` | [2020-10-01-preview](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Authorization/2020-10-01-preview/roleAssignments) | +| `Microsoft.Network/privateEndpoints` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints) | +| `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2021-05-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-05-01/privateEndpoints/privateDnsZoneGroups) | +| `Microsoft.Web/staticSites` | [2021-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2021-03-01/staticSites) | +| `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | +| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | +| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | + +## Parameters + +**Required parameters** +| Parameter Name | Type | Description | +| :-- | :-- | :-- | +| `name` | string | Name of the static site. | + +**Optional parameters** +| Parameter Name | Type | Default Value | Allowed Values | Description | +| :-- | :-- | :-- | :-- | :-- | +| `allowConfigFileUpdates` | bool | `True` | | False if config file is locked for this static web app; otherwise, true. | +| `appSettings` | object | `{object}` | | Static site app settings. | +| `branch` | string | `''` | | The branch name of the GitHub repo. | +| `buildProperties` | object | `{object}` | | Build properties for the static site. | +| `customDomains` | _[customDomains](customDomains/readme.md)_ array | `[]` | | The custom domains associated with this static site. The deployment will fail as long as the validation records are not present. | +| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via the Customer Usage Attribution ID (GUID). | +| `enterpriseGradeCdnStatus` | string | `'Disabled'` | `[Disabled, Disabling, Enabled, Enabling]` | State indicating the status of the enterprise grade CDN serving traffic to the static web app. | +| `functionAppSettings` | object | `{object}` | | Function app settings. | +| `linkedBackend` | object | `{object}` | | Object with "resourceId" and "location" of the a user defined function app. | +| `location` | string | `[resourceGroup().location]` | | Location for all resources. | +| `lock` | string | `''` | `[, CanNotDelete, ReadOnly]` | Specify the type of lock. | +| `privateEndpoints` | array | `[]` | | Configuration details for private endpoints. For security reasons, it is recommended to use private endpoints whenever possible. | +| `provider` | string | `'None'` | | The provider that submitted the last deployment to the primary environment of the static site. | +| `repositoryToken` | secureString | `''` | | The Personal Access Token for accessing the GitHub repo. | +| `repositoryUrl` | string | `''` | | The name of the GitHub repo. | +| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. | +| `sku` | string | `'Free'` | `[Free, Standard]` | Type of static site to deploy. | +| `stagingEnvironmentPolicy` | string | `'Enabled'` | `[Enabled, Disabled]` | State indicating whether staging environments are allowed or not allowed for a static web app. | +| `systemAssignedIdentity` | bool | `False` | | Enables system assigned managed identity on the resource. | +| `tags` | object | `{object}` | | Tags of the resource. | +| `templateProperties` | object | `{object}` | | Template Options for the static site. | +| `userAssignedIdentities` | object | `{object}` | | The ID(s) to assign to the resource. | + + +### Parameter Usage: `privateEndpoints` + +To use Private Endpoint the following dependencies must be deployed: + +- Destination subnet must be created with the following configuration option - `"privateEndpointNetworkPolicies": "Disabled"`. Setting this option acknowledges that NSG rules are not applied to Private Endpoints (this capability is coming soon). A full example is available in the Virtual Network Module. +- Although not strictly required, it is highly recommended to first create a private DNS Zone to host Private Endpoint DNS records. See [Azure Private Endpoint DNS configuration](https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns) for more information. + +

+ +Parameter JSON format + +```json +"privateEndpoints": { + "value": [ + // Example showing all available fields + { + "name": "sxx-az-pe", // Optional: Name will be automatically generated if one is not provided here + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", + "service": "<>", // e.g. vault, registry, file, blob, queue, table etc. + "privateDnsZoneResourceIds": [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified + "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net" + ], + "customDnsConfigs": [ // Optional + { + "fqdn": "customname.test.local", + "ipAddresses": [ + "10.10.10.10" + ] + } + ] + }, + // Example showing only mandatory fields + { + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001", + "service": "<>" // e.g. vault, registry, file, blob, queue, table etc. + } + ] +} +``` + +
+ +
+ +Bicep format + +```bicep +privateEndpoints: [ + // Example showing all available fields + { + name: 'sxx-az-pe' // Optional: Name will be automatically generated if one is not provided here + subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' + service: '<>' // e.g. vault registry file blob queue table etc. + privateDnsZoneResourceIds: [ // Optional: No DNS record will be created if a private DNS zone Resource ID is not specified + '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/privateDnsZones/privatelink.blob.core.windows.net' + ] + // Optional + customDnsConfigs: [ + { + fqdn: 'customname.test.local' + ipAddresses: [ + '10.10.10.10' + ] + } + ] + } + // Example showing only mandatory fields + { + subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/sxx-az-vnet-x-001/subnets/sxx-az-subnet-x-001' + service: '<>' // e.g. vault registry file blob queue table etc. + } +] +``` + +
+

+ +### Parameter Usage: `roleAssignments` + +Create a role assignment for the given resource. If you want to assign a service principal / managed identity that is created in the same deployment, make sure to also specify the `'principalType'` parameter and set it to `'ServicePrincipal'`. This will ensure the role assignment waits for the principal's propagation in Azure. + +

+ +Parameter JSON format + +```json +"roleAssignments": { + "value": [ + { + "roleDefinitionIdOrName": "Reader", + "description": "Reader Role Assignment", + "principalIds": [ + "12345678-1234-1234-1234-123456789012", // object 1 + "78945612-1234-1234-1234-123456789012" // object 2 + ] + }, + { + "roleDefinitionIdOrName": "/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11", + "principalIds": [ + "12345678-1234-1234-1234-123456789012" // object 1 + ], + "principalType": "ServicePrincipal" + } + ] +} +``` + +
+ +
+ +Bicep format + +```bicep +roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + description: 'Reader Role Assignment' + principalIds: [ + '12345678-1234-1234-1234-123456789012' // object 1 + '78945612-1234-1234-1234-123456789012' // object 2 + ] + } + { + roleDefinitionIdOrName: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11' + principalIds: [ + '12345678-1234-1234-1234-123456789012' // object 1 + ] + principalType: 'ServicePrincipal' + } +] +``` + +
+

+ +### Parameter Usage: `tags` + +Tag names and tag values can be provided as needed. A tag can be left without a value. + +

+ +Parameter JSON format + +```json +"tags": { + "value": { + "Environment": "Non-Prod", + "Contact": "test.user@testcompany.com", + "PurchaseOrder": "1234", + "CostCenter": "7890", + "ServiceName": "DeploymentValidation", + "Role": "DeploymentValidation" + } +} +``` + +
+ +
+ +Bicep format + +```bicep +tags: { + Environment: 'Non-Prod' + Contact: 'test.user@testcompany.com' + PurchaseOrder: '1234' + CostCenter: '7890' + ServiceName: 'DeploymentValidation' + Role: 'DeploymentValidation' +} +``` + +
+

+ +### Parameter Usage: `userAssignedIdentities` + +You can specify multiple user assigned identities to a resource by providing additional resource IDs using the following format: + +

+ +Parameter JSON format + +```json +"userAssignedIdentities": { + "value": { + "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001": {}, + "/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002": {} + } +} +``` + +
+ +
+ +Bicep format + +```bicep +userAssignedIdentities: { + '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-001': {} + '/subscriptions/12345678-1234-1234-1234-123456789012/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-sxx-az-msi-x-002': {} +} +``` + +
+

+ +## Outputs + +| Output Name | Type | Description | +| :-- | :-- | :-- | +| `location` | string | The location the resource was deployed into. | +| `name` | string | The name of the static site. | +| `resourceGroupName` | string | The resource group the static site was deployed into. | +| `resourceId` | string | The resource ID of the static site. | +| `systemAssignedPrincipalId` | string | The principal ID of the system assigned identity. | + +## Deployment examples + +

Example 1

+ +
+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-min-001" + } + } +} +``` + +
+ +
+ +via Bicep module + +```bicep +module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-staticSites' + params: { + name: '<>-az-wss-min-001' + } +} +``` + +
+

+ +

Example 2

+ +
+ +via JSON Parameter file + +```json +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-x-001" + }, + "lock": { + "value": "CanNotDelete" + }, + "sku": { + "value": "Standard" + }, + "stagingEnvironmentPolicy": { + "value": "Enabled" + }, + "allowConfigFileUpdates": { + "value": true + }, + "enterpriseGradeCdnStatus": { + "value": "Disabled" + }, + "systemAssignedIdentity": { + "value": true + }, + "customDomains": { + "value": [ + "<>domain1.domain", + "<>domain2.domain.domain", + "<>domain3.domain.domain.domain" + ] + }, + "appSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "functionAppSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "userAssignedIdentities": { + "value": { + "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} + } + }, + "roleAssignments": { + "value": [ + { + "roleDefinitionIdOrName": "Reader", + "principalIds": [ + "<>" + ] + } + ] + }, + "privateEndpoints": { + "value": [ + { + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", + "service": "staticSites" + } + ] + }, + "linkedBackend": { + "value": { + "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001" + } + } + } +} +``` + +
+ +
+ +via Bicep module + +```bicep +module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { + name: '${uniqueString(deployment().name)}-staticSites' + params: { + name: '<>-az-wss-x-001' + lock: 'CanNotDelete' + sku: 'Standard' + stagingEnvironmentPolicy: 'Enabled' + allowConfigFileUpdates: true + enterpriseGradeCdnStatus: 'Disabled' + systemAssignedIdentity: true + customDomains: [ + '<>domain1.domain' + '<>domain2.domain.domain' + '<>domain3.domain.domain.domain' + ] + appSettings: { + foo: 'bar' + setting: 1 + } + functionAppSettings: { + foo: 'bar' + setting: 1 + } + userAssignedIdentities: { + '/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001': {} + } + roleAssignments: [ + { + roleDefinitionIdOrName: 'Reader' + principalIds: [ + '<>' + ] + } + ] + privateEndpoints: [ + { + subnetResourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints' + service: 'staticSites' + } + ] + linkedBackend: { + resourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001' + } + } +} +``` + +
+

From 7b74e78f68cd4d1cbc1f485a69634a6e90b04e10 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 21:07:09 +0200 Subject: [PATCH 10/27] Removed custom domain test as it is not operational --- .../staticSites/.test/parameters.json | 7 ---- modules/Microsoft.Web/staticSites/readme.md | 33 +++++++++++++++++++ 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/.test/parameters.json b/modules/Microsoft.Web/staticSites/.test/parameters.json index 4728d3cd16..a2df63467e 100644 --- a/modules/Microsoft.Web/staticSites/.test/parameters.json +++ b/modules/Microsoft.Web/staticSites/.test/parameters.json @@ -23,13 +23,6 @@ "systemAssignedIdentity": { "value": true }, - "customDomains": { - "value": [ - "<>domain1.domain", - "<>domain2.domain.domain", - "<>domain3.domain.domain.domain" - ] - }, "appSettings": { "value": { "foo": "bar", diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index fa20b8aa47..47bac7132a 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -266,6 +266,39 @@ userAssignedIdentities: {

+### Parameter Usage: `customDomains` + +

+ +Parameter JSON format + +```json +"customDomains": { + "value": [ + "<>domain1.domain", + "<>domain2.domain.domain", + "<>domain3.domain.domain.domain" + ] +} +``` + +
+ +
+ +Bicep format + +```bicep +customDomains: [ + 'carmldomain1.domain' + 'carmldomain2.domain.domain' + 'carmldomain3.domain.domain.domain' +] +``` + +
+

+ ## Outputs | Output Name | Type | Description | From 06450387983dcd29591f6e1714d0f957c2afc3c5 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 21:07:55 +0200 Subject: [PATCH 11/27] Updated docs --- modules/Microsoft.Web/staticSites/readme.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index 47bac7132a..157c650c0d 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -379,13 +379,6 @@ module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { "systemAssignedIdentity": { "value": true }, - "customDomains": { - "value": [ - "<>domain1.domain", - "<>domain2.domain.domain", - "<>domain3.domain.domain.domain" - ] - }, "appSettings": { "value": { "foo": "bar", @@ -447,11 +440,6 @@ module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { allowConfigFileUpdates: true enterpriseGradeCdnStatus: 'Disabled' systemAssignedIdentity: true - customDomains: [ - '<>domain1.domain' - '<>domain2.domain.domain' - '<>domain3.domain.domain.domain' - ] appSettings: { foo: 'bar' setting: 1 From d7fc4ff98aec57654b4a5760bb394e56e5106533 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 12 Jul 2022 22:17:04 +0200 Subject: [PATCH 12/27] Updated test --- modules/Microsoft.Web/staticSites/.test/parameters.json | 2 +- modules/Microsoft.Web/staticSites/readme.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/.test/parameters.json b/modules/Microsoft.Web/staticSites/.test/parameters.json index a2df63467e..c6d8a953f9 100644 --- a/modules/Microsoft.Web/staticSites/.test/parameters.json +++ b/modules/Microsoft.Web/staticSites/.test/parameters.json @@ -60,7 +60,7 @@ }, "linkedBackend": { "value": { - "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001" + "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001" } } } diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index 157c650c0d..0585f721a3 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -416,7 +416,7 @@ module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { }, "linkedBackend": { "value": { - "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001" + "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001" } } } @@ -466,7 +466,7 @@ module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { } ] linkedBackend: { - resourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/<>-az-fa-x-001' + resourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001' } } } From e2886a0ae652652ad3e001a228df9260975705bb Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Sat, 23 Jul 2022 18:16:52 +0200 Subject: [PATCH 13/27] Update modules/Microsoft.Web/staticSites/config/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/config/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/config/deploy.bicep b/modules/Microsoft.Web/staticSites/config/deploy.bicep index d61acbfda5..8df900b589 100644 --- a/modules/Microsoft.Web/staticSites/config/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/config/deploy.bicep @@ -9,7 +9,7 @@ param kind string param properties object @description('Conditional. The name of the parent Static Web App. Required if the template is used in a standalone deployment.') -param name string +param staticSiteName string @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') param enableDefaultTelemetry bool = true From b1f9bf2936f80e6bb10fde9401de326cbdb4e786 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Sat, 23 Jul 2022 18:17:14 +0200 Subject: [PATCH 14/27] Update modules/Microsoft.Web/staticSites/config/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/config/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/config/deploy.bicep b/modules/Microsoft.Web/staticSites/config/deploy.bicep index 8df900b589..c48224b918 100644 --- a/modules/Microsoft.Web/staticSites/config/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/config/deploy.bicep @@ -18,7 +18,7 @@ param enableDefaultTelemetry bool = true param location string = resourceGroup().location resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { - name: name + name: staticSiteName } resource config 'Microsoft.Web/staticSites/config@2022-03-01' = { From accab41aebbc149058d807336fa01bd6f970f6ba Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 23 Jul 2022 22:11:34 +0200 Subject: [PATCH 15/27] Updated param files & template --- .../staticSites/.test/min.parameters.json | 12 +- .../staticSites/.test/parameters.json | 126 +++++++++--------- .../Microsoft.Web/staticSites/deploy.bicep | 4 +- 3 files changed, 71 insertions(+), 71 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/.test/min.parameters.json b/modules/Microsoft.Web/staticSites/.test/min.parameters.json index dd29975a58..b5781f46f0 100644 --- a/modules/Microsoft.Web/staticSites/.test/min.parameters.json +++ b/modules/Microsoft.Web/staticSites/.test/min.parameters.json @@ -1,9 +1,9 @@ { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-min-001" + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-min-001" + } } - } } diff --git a/modules/Microsoft.Web/staticSites/.test/parameters.json b/modules/Microsoft.Web/staticSites/.test/parameters.json index c6d8a953f9..912d9e5c85 100644 --- a/modules/Microsoft.Web/staticSites/.test/parameters.json +++ b/modules/Microsoft.Web/staticSites/.test/parameters.json @@ -1,67 +1,67 @@ { - "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "name": { - "value": "<>-az-wss-x-001" - }, - "lock": { - "value": "CanNotDelete" - }, - "sku": { - "value": "Standard" - }, - "stagingEnvironmentPolicy": { - "value": "Enabled" - }, - "allowConfigFileUpdates": { - "value": true - }, - "enterpriseGradeCdnStatus": { - "value": "Disabled" - }, - "systemAssignedIdentity": { - "value": true - }, - "appSettings": { - "value": { - "foo": "bar", - "setting": 1 - } - }, - "functionAppSettings": { - "value": { - "foo": "bar", - "setting": 1 - } - }, - "userAssignedIdentities": { - "value": { - "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} - } - }, - "roleAssignments": { - "value": [ - { - "roleDefinitionIdOrName": "Reader", - "principalIds": [ - "<>" - ] + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "name": { + "value": "<>-az-wss-x-001" + }, + "lock": { + "value": "CanNotDelete" + }, + "sku": { + "value": "Standard" + }, + "stagingEnvironmentPolicy": { + "value": "Enabled" + }, + "allowConfigFileUpdates": { + "value": true + }, + "enterpriseGradeCdnStatus": { + "value": "Disabled" + }, + "systemAssignedIdentity": { + "value": true + }, + "appSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "functionAppSettings": { + "value": { + "foo": "bar", + "setting": 1 + } + }, + "userAssignedIdentities": { + "value": { + "/subscriptions/<>/resourcegroups/validation-rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/adp-<>-az-msi-x-001": {} + } + }, + "roleAssignments": { + "value": [ + { + "roleDefinitionIdOrName": "Reader", + "principalIds": [ + "<>" + ] + } + ] + }, + "privateEndpoints": { + "value": [ + { + "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", + "service": "staticSites" + } + ] + }, + "linkedBackend": { + "value": { + "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001" + } } - ] - }, - "privateEndpoints": { - "value": [ - { - "subnetResourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Network/virtualNetworks/adp-<>-az-vnet-x-001/subnets/<>-az-subnet-x-005-privateEndpoints", - "service": "staticSites" - } - ] - }, - "linkedBackend": { - "value": { - "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001" - } } - } } diff --git a/modules/Microsoft.Web/staticSites/deploy.bicep b/modules/Microsoft.Web/staticSites/deploy.bicep index c76a1d51c4..25d62222ce 100644 --- a/modules/Microsoft.Web/staticSites/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/deploy.bicep @@ -146,7 +146,7 @@ module staticSite_appSettings 'config/deploy.bicep' = if (!empty(appSettings)) { name: '${uniqueString(deployment().name, location)}-StaticSite-appSettings' params: { kind: 'appsettings' - name: staticSite.name + staticSiteName: staticSite.name properties: appSettings enableDefaultTelemetry: enableReferencedModulesTelemetry } @@ -156,7 +156,7 @@ module staticSite_functionAppSettings 'config/deploy.bicep' = if (!empty(functio name: '${uniqueString(deployment().name, location)}-StaticSite-functionAppSettings' params: { kind: 'functionappsettings' - name: staticSite.name + staticSiteName: staticSite.name properties: functionAppSettings enableDefaultTelemetry: enableReferencedModulesTelemetry } From 7e6a1b990ea76e6fbdd4611ac66ce8d0c41fb4ec Mon Sep 17 00:00:00 2001 From: MrMCake Date: Sat, 23 Jul 2022 22:13:18 +0200 Subject: [PATCH 16/27] Update to latest --- modules/Microsoft.Web/staticSites/config/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/config/readme.md b/modules/Microsoft.Web/staticSites/config/readme.md index 99ebf6ddfc..511297862e 100644 --- a/modules/Microsoft.Web/staticSites/config/readme.md +++ b/modules/Microsoft.Web/staticSites/config/readme.md @@ -25,7 +25,7 @@ This module deploys a Static Site Config. **Conditional parameters** | Parameter Name | Type | Description | | :-- | :-- | :-- | -| `name` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | +| `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | **Optional parameters** | Parameter Name | Type | Default Value | Description | From 976bd48569670695505362882bba3ba09b86240f Mon Sep 17 00:00:00 2001 From: MrMCake Date: Wed, 17 Aug 2022 10:30:26 +0200 Subject: [PATCH 17/27] Update to latest --- modules/Microsoft.Web/staticSites/config/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/config/deploy.bicep b/modules/Microsoft.Web/staticSites/config/deploy.bicep index c48224b918..dcbf7382fc 100644 --- a/modules/Microsoft.Web/staticSites/config/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/config/deploy.bicep @@ -22,7 +22,7 @@ resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { } resource config 'Microsoft.Web/staticSites/config@2022-03-01' = { - #disable-next-line BCP225 + #disable-next-line BCP225 // Disables incorrect error that `name` cannot be determined at compile time. name: kind parent: staticSite properties: properties From 41cc52fbe2239d872a49104921fdb706d99f38fa Mon Sep 17 00:00:00 2001 From: MrMCake Date: Fri, 2 Sep 2022 11:40:18 +0200 Subject: [PATCH 18/27] Updated ReadMe --- modules/Microsoft.Web/staticSites/config/readme.md | 5 +++++ modules/Microsoft.Web/staticSites/customDomains/readme.md | 7 ++++++- modules/Microsoft.Web/staticSites/linkedBackends/readme.md | 7 ++++++- modules/Microsoft.Web/staticSites/readme.md | 4 ++-- 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/config/readme.md b/modules/Microsoft.Web/staticSites/config/readme.md index 511297862e..a5789ac90e 100644 --- a/modules/Microsoft.Web/staticSites/config/readme.md +++ b/modules/Microsoft.Web/staticSites/config/readme.md @@ -7,6 +7,7 @@ This module deploys a Static Site Config. - [Resource Types](#Resource-Types) - [Parameters](#Parameters) - [Outputs](#Outputs) +- [Cross-referenced modules](#Cross-referenced-modules) ## Resource Types @@ -41,3 +42,7 @@ This module deploys a Static Site Config. | `name` | string | The name of the config. | | `resourceGroupName` | string | The name of the resource group the config was created in. | | `resourceId` | string | The resource ID of the config. | + +## Cross-referenced modules + +_None_ diff --git a/modules/Microsoft.Web/staticSites/customDomains/readme.md b/modules/Microsoft.Web/staticSites/customDomains/readme.md index b118513150..2cdc6764a9 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/readme.md +++ b/modules/Microsoft.Web/staticSites/customDomains/readme.md @@ -7,12 +7,13 @@ This module deploys a Custom Domain into a Static Site. - [Resource Types](#Resource-Types) - [Parameters](#Parameters) - [Outputs](#Outputs) +- [Cross-referenced modules](#Cross-referenced-modules) ## Resource Types | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | +| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2022-03-01/staticSites/customDomains) | ## Parameters @@ -37,3 +38,7 @@ This module deploys a Custom Domain into a Static Site. | `name` | string | The name of the static site. | | `resourceGroupName` | string | The resource group the static site was deployed into. | | `resourceId` | string | The resource ID of the static site. | + +## Cross-referenced modules + +_None_ diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md index 1020a2864d..26dafb6db4 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md +++ b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md @@ -7,12 +7,13 @@ This module deploys a Custom Function App into a Static Site using the linkedBac - [Resource Types](#Resource-Types) - [Parameters](#Parameters) - [Outputs](#Outputs) +- [Cross-referenced modules](#Cross-referenced-modules) ## Resource Types | Resource Type | API Version | | :-- | :-- | -| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | +| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2022-03-01/staticSites/linkedBackends) | ## Parameters @@ -42,3 +43,7 @@ This module deploys a Custom Function App into a Static Site using the linkedBac | `name` | string | The name of the static site. | | `resourceGroupName` | string | The resource group the static site was deployed into. | | `resourceId` | string | The resource ID of the static site. | + +## Cross-referenced modules + +_None_ diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index 28d49cc8bd..b9be17736e 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -20,8 +20,8 @@ This module deploys a Static Web App. | `Microsoft.Network/privateEndpoints/privateDnsZoneGroups` | [2021-08-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Network/2021-08-01/privateEndpoints/privateDnsZoneGroups) | | `Microsoft.Web/staticSites` | [2021-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2021-03-01/staticSites) | | `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | -| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/customDomains) | -| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites) | +| `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2022-03-01/staticSites/customDomains) | +| `Microsoft.Web/staticSites/linkedBackends` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2022-03-01/staticSites/linkedBackends) | ## Parameters From caa3e8662fb4a5c2f48d66419cf27481421fa0f3 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 27 Sep 2022 21:32:36 +0200 Subject: [PATCH 19/27] Updated test --- .../.test/common/dependencies.bicep | 33 ++++++++++++++++++- .../.test/common/deploy.test.bicep | 4 ++- modules/Microsoft.Web/staticSites/readme.md | 4 +-- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/modules/Microsoft.Web/staticSites/.test/common/dependencies.bicep b/modules/Microsoft.Web/staticSites/.test/common/dependencies.bicep index 06ded5ecf0..6342518c23 100644 --- a/modules/Microsoft.Web/staticSites/.test/common/dependencies.bicep +++ b/modules/Microsoft.Web/staticSites/.test/common/dependencies.bicep @@ -7,6 +7,12 @@ param virtualNetworkName string @description('Required. The name of the Managed Identity to create.') param managedIdentityName string +@description('Required. The name of the Function App to create.') +param siteName string + +@description('Required. The name of the Server Farm to create.') +param serverFarmName string + resource virtualNetwork 'Microsoft.Network/virtualNetworks@2022-01-01' = { name: virtualNetworkName location: location @@ -48,6 +54,28 @@ resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018- location: location } +resource serverFarm 'Microsoft.Web/serverfarms@2022-03-01' = { + name: serverFarmName + location: location + sku: { + name: 'S1' + tier: 'Standard' + size: 'S1' + family: 'S' + capacity: 1 + } + properties: {} +} + +resource functionApp 'Microsoft.Web/sites@2022-03-01' = { + name: siteName + location: location + kind: 'functionapp' + properties: { + serverFarmId: serverFarm.id + } +} + @description('The resource ID of the created Virtual Network Subnet.') output subnetResourceId string = virtualNetwork.properties.subnets[0].id @@ -57,5 +85,8 @@ output managedIdentityPrincipalId string = managedIdentity.properties.principalI @description('The resource ID of the created Managed Identity.') output managedIdentityResourceId string = managedIdentity.id -@description('The resource ID of the created private DNS zone.') +@description('The resource ID of the created Private DNS zone.') output privateDNSZoneResourceId string = privateDNSZone.id + +@description('The resource ID of the created Function App.') +output siteResourceId string = functionApp.id diff --git a/modules/Microsoft.Web/staticSites/.test/common/deploy.test.bicep b/modules/Microsoft.Web/staticSites/.test/common/deploy.test.bicep index 869980f275..0c9b1dfea2 100644 --- a/modules/Microsoft.Web/staticSites/.test/common/deploy.test.bicep +++ b/modules/Microsoft.Web/staticSites/.test/common/deploy.test.bicep @@ -30,6 +30,8 @@ module resourceGroupResources 'dependencies.bicep' = { params: { virtualNetworkName: 'dep-<>-vnet-${serviceShort}' managedIdentityName: 'dep-<>-msi-${serviceShort}' + siteName: 'dep-<>-fa-${serviceShort}' + serverFarmName: 'dep-<>-sf-${serviceShort}' } } @@ -79,7 +81,7 @@ module testDeployment '../../deploy.bicep' = { setting: 1 } linkedBackend: { - resourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001' + resourceId: resourceGroupResources.outputs.siteResourceId } } } diff --git a/modules/Microsoft.Web/staticSites/readme.md b/modules/Microsoft.Web/staticSites/readme.md index f45e758cc0..7de46d3c09 100644 --- a/modules/Microsoft.Web/staticSites/readme.md +++ b/modules/Microsoft.Web/staticSites/readme.md @@ -356,7 +356,7 @@ module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { setting: 1 } linkedBackend: { - resourceId: '/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001' + resourceId: '' } lock: 'CanNotDelete' privateEndpoints: [ @@ -425,7 +425,7 @@ module staticSites './Microsoft.Web/staticSites/deploy.bicep' = { }, "linkedBackend": { "value": { - "resourceId": "/subscriptions/<>/resourceGroups/validation-rg/providers/Microsoft.Web/sites/adp-<>-az-fa-001" + "resourceId": "" } }, "lock": { From 372fd69dc3eeb6b565de90ba50420a6e66f57886 Mon Sep 17 00:00:00 2001 From: MrMCake Date: Tue, 27 Sep 2022 21:50:42 +0200 Subject: [PATCH 20/27] Updated readme --- modules/Microsoft.Web/staticSites/config/readme.md | 3 +++ modules/Microsoft.Web/staticSites/customDomains/readme.md | 2 ++ modules/Microsoft.Web/staticSites/linkedBackends/readme.md | 3 +++ 3 files changed, 8 insertions(+) diff --git a/modules/Microsoft.Web/staticSites/config/readme.md b/modules/Microsoft.Web/staticSites/config/readme.md index a5789ac90e..15e4007f66 100644 --- a/modules/Microsoft.Web/staticSites/config/readme.md +++ b/modules/Microsoft.Web/staticSites/config/readme.md @@ -18,17 +18,20 @@ This module deploys a Static Site Config. ## Parameters **Required parameters** + | Parameter Name | Type | Allowed Values | Description | | :-- | :-- | :-- | :-- | | `kind` | string | `[appsettings, functionappsettings]` | Type of settings to apply. | | `properties` | object | | App settings. | **Conditional parameters** + | Parameter Name | Type | Description | | :-- | :-- | :-- | | `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | **Optional parameters** + | Parameter Name | Type | Default Value | Description | | :-- | :-- | :-- | :-- | | `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | diff --git a/modules/Microsoft.Web/staticSites/customDomains/readme.md b/modules/Microsoft.Web/staticSites/customDomains/readme.md index 2cdc6764a9..5039a38335 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/readme.md +++ b/modules/Microsoft.Web/staticSites/customDomains/readme.md @@ -18,12 +18,14 @@ This module deploys a Custom Domain into a Static Site. ## Parameters **Conditional parameters** + | Parameter Name | Type | Description | | :-- | :-- | :-- | | `name` | string | The custom domain name. Required if the template is used in a standalone deployment. | | `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | **Optional parameters** + | Parameter Name | Type | Default Value | Description | | :-- | :-- | :-- | :-- | | `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md index 26dafb6db4..f7a169b4a3 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/readme.md +++ b/modules/Microsoft.Web/staticSites/linkedBackends/readme.md @@ -18,16 +18,19 @@ This module deploys a Custom Function App into a Static Site using the linkedBac ## Parameters **Required parameters** + | Parameter Name | Type | Description | | :-- | :-- | :-- | | `backendResourceId` | string | The resource id of the backend linked to the static site. | **Conditional parameters** + | Parameter Name | Type | Description | | :-- | :-- | :-- | | `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | **Optional parameters** + | Parameter Name | Type | Default Value | Description | | :-- | :-- | :-- | :-- | | `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | From 052f854d60784586bf348901d3b4c9de55f6607e Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Wed, 28 Sep 2022 16:44:22 +0200 Subject: [PATCH 21/27] Update modules/Microsoft.Web/staticSites/customDomains/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/customDomains/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep index 262f4f87b9..8c11b98bfd 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep @@ -43,5 +43,5 @@ output name string = customDomain.name @description('The resource ID of the static site.') output resourceId string = customDomain.id -@description('The resource group the static site was deployed into.') +@description('The resource group the static site custom domain was deployed into.') output resourceGroupName string = resourceGroup().name From 44e97950fa2a75c04466fe6006c5f02b1299aba0 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Wed, 28 Sep 2022 16:44:33 +0200 Subject: [PATCH 22/27] Update modules/Microsoft.Web/staticSites/customDomains/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/customDomains/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep index 8c11b98bfd..8eb49bc291 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep @@ -40,7 +40,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena @description('The name of the static site.') output name string = customDomain.name -@description('The resource ID of the static site.') +@description('The resource ID of the static site custom domain.') output resourceId string = customDomain.id @description('The resource group the static site custom domain was deployed into.') From e8c5b5f77e0754ae2ef3d950506a9b61d867873f Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Wed, 28 Sep 2022 16:44:45 +0200 Subject: [PATCH 23/27] Update modules/Microsoft.Web/staticSites/customDomains/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/customDomains/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep index 8eb49bc291..18e262b743 100644 --- a/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/customDomains/deploy.bicep @@ -37,7 +37,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -@description('The name of the static site.') +@description('The name of the static site custom domain.') output name string = customDomain.name @description('The resource ID of the static site custom domain.') From 7a3b74386705f90a70a9323aa6267e82b83e8a02 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Wed, 28 Sep 2022 16:44:59 +0200 Subject: [PATCH 24/27] Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep index 6199d5ead1..f48abea4a3 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep @@ -47,5 +47,5 @@ output name string = linkedBackend.name @description('The resource ID of the static site.') output resourceId string = linkedBackend.id -@description('The resource group the static site was deployed into.') +@description('The resource group the static site linked backend was deployed into.') output resourceGroupName string = resourceGroup().name From a923adf96832732f01631a25811022c1314e65bf Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Wed, 28 Sep 2022 16:45:42 +0200 Subject: [PATCH 25/27] Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep index f48abea4a3..76a88e488a 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep @@ -44,7 +44,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena @description('The name of the static site.') output name string = linkedBackend.name -@description('The resource ID of the static site.') +@description('The resource ID of the static site linked backend.') output resourceId string = linkedBackend.id @description('The resource group the static site linked backend was deployed into.') From 822dcaf9c3ff1187e588cd9667b9a86930433d48 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Wed, 28 Sep 2022 16:47:55 +0200 Subject: [PATCH 26/27] Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep index 76a88e488a..ee194f884b 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep @@ -41,7 +41,7 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena } } -@description('The name of the static site.') +@description('The name of the static site linked backend.') output name string = linkedBackend.name @description('The resource ID of the static site linked backend.') From 5e892717c93076b6ed86f635f60856089f962b64 Mon Sep 17 00:00:00 2001 From: Alexander Sehr Date: Wed, 28 Sep 2022 16:48:06 +0200 Subject: [PATCH 27/27] Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep Co-authored-by: Erika Gressi <56914614+eriqua@users.noreply.github.com> --- modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep index ee194f884b..c907333d30 100644 --- a/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep +++ b/modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep @@ -1,4 +1,4 @@ -@description('Required. The resource id of the backend linked to the static site.') +@description('Required. The resource ID of the backend linked to the static site.') param backendResourceId string @description('Optional. The region of the backend linked to the static site.')