Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Web site unique default hostname (autoGeneratedDomainNameLabelScope) #4386

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions avm/res/web/site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,6 +1353,7 @@ module site 'br/public:avm/res/web/site:<version>' = {
name: 'wswamax001'
serverFarmResourceId: '<serverFarmResourceId>'
// Non-required parameters
autoGeneratedDomainNameLabelScope: 'TenantReuse'
basicPublishingCredentialsPolicies: [
{
allow: false
Expand Down Expand Up @@ -1570,6 +1571,9 @@ module site 'br/public:avm/res/web/site:<version>' = {
"value": "<serverFarmResourceId>"
},
// Non-required parameters
"autoGeneratedDomainNameLabelScope": {
"value": "TenantReuse"
},
"basicPublishingCredentialsPolicies": {
"value": [
{
Expand Down Expand Up @@ -1815,6 +1819,7 @@ param kind = 'app'
param name = 'wswamax001'
param serverFarmResourceId = '<serverFarmResourceId>'
// Non-required parameters
param autoGeneratedDomainNameLabelScope = 'TenantReuse'
param basicPublishingCredentialsPolicies = [
{
allow: false
Expand Down Expand Up @@ -3024,6 +3029,7 @@ param siteConfig = {
| [`appServiceEnvironmentResourceId`](#parameter-appserviceenvironmentresourceid) | string | The resource ID of the app service environment to use for this resource. |
| [`appSettingsKeyValuePairs`](#parameter-appsettingskeyvaluepairs) | object | The app settings-value pairs except for AzureWebJobsStorage, AzureWebJobsDashboard, APPINSIGHTS_INSTRUMENTATIONKEY and APPLICATIONINSIGHTS_CONNECTION_STRING. |
| [`authSettingV2Configuration`](#parameter-authsettingv2configuration) | object | The auth settings V2 configuration. |
| [`autoGeneratedDomainNameLabelScope`](#parameter-autogenerateddomainnamelabelscope) | string | Indicates the endpoint name reuse scope. The default value is disabled. |
| [`basicPublishingCredentialsPolicies`](#parameter-basicpublishingcredentialspolicies) | array | The site publishing credential policy names which are associated with the sites. |
| [`clientAffinityEnabled`](#parameter-clientaffinityenabled) | bool | If client affinity is enabled. |
| [`clientCertEnabled`](#parameter-clientcertenabled) | bool | To enable client certificate authentication (TLS mutual authentication). |
Expand Down Expand Up @@ -3131,6 +3137,22 @@ The auth settings V2 configuration.
- Required: No
- Type: object

### Parameter: `autoGeneratedDomainNameLabelScope`

Indicates the endpoint name reuse scope. The default value is disabled.

- Required: No
- Type: string
- Allowed:
```Bicep
[
'NoReuse'
'ResourceGroupReuse'
'SubscriptionReuse'
'TenantReuse'
]
```

### Parameter: `basicPublishingCredentialsPolicies`

The site publishing credential policy names which are associated with the sites.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "7686713695944836722"
"version": "0.33.93.31351",
"templateHash": "7001118912896436334"
},
"name": "Web Site Basic Publishing Credentials Policies",
"description": "This module deploys a Web Site Basic Publishing Credentials Policy."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/config--appsettings/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "6410547302386858558"
"version": "0.33.93.31351",
"templateHash": "10907400404924884098"
},
"name": "Site App Settings",
"description": "This module deploys a Site App Setting."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/config--authsettingsv2/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "11113399312695963924"
"version": "0.33.93.31351",
"templateHash": "1129994114817101549"
},
"name": "Site Auth Settings V2 Config",
"description": "This module deploys a Site Auth Settings V2 Configuration."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/config--logs/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "7848470524705559903"
"version": "0.33.93.31351",
"templateHash": "17967336872376441757"
},
"name": "Site logs Config",
"description": "This module deploys a Site logs Configuration."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/config--web/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "17229460238192107968"
"version": "0.33.93.31351",
"templateHash": "15058680643544097487"
},
"name": "Site Web Config",
"description": "This module deploys web settings configuration available under sites/config name: web."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/extensions--msdeploy/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "18138875055545072289"
"version": "0.33.93.31351",
"templateHash": "14895622660217616811"
},
"name": "Site Deployment Extension ",
"description": "This module deploys a Site extension for MSDeploy."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "6378705059063789109"
"version": "0.33.93.31351",
"templateHash": "13214417392638890300"
},
"name": "Web/Function Apps Hybrid Connection Relay",
"description": "This module deploys a Site Hybrid Connection Namespace Relay."
Expand Down
12 changes: 12 additions & 0 deletions avm/res/web/site/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ param publicNetworkAccess string?
@description('Optional. End to End Encryption Setting.')
param e2eEncryptionEnabled bool?

@description('Optional. Indicates the endpoint name reuse scope. The default value is disabled.')
@allowed([
'NoReuse'
'ResourceGroupReuse'
'SubscriptionReuse'
'TenantReuse'
])
param autoGeneratedDomainNameLabelScope string?

var formattedUserAssignedIdentities = reduce(
map((managedIdentities.?userAssignedResourceIds ?? []), (id) => { '${id}': {} }),
{},
Expand Down Expand Up @@ -296,6 +305,9 @@ resource app 'Microsoft.Web/sites@2024-04-01' = {
vnetRouteAllEnabled: vnetRouteAllEnabled
scmSiteAlsoStopped: scmSiteAlsoStopped
endToEndEncryptionEnabled: e2eEncryptionEnabled
autoGeneratedDomainNameLabelScope: !empty(autoGeneratedDomainNameLabelScope)
? autoGeneratedDomainNameLabelScope
: null
}
}

Expand Down
72 changes: 43 additions & 29 deletions avm/res/web/site/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "11078104901059265686"
"version": "0.33.93.31351",
"templateHash": "11212586863074867675"
},
"name": "Web/Function Apps",
"description": "This module deploys a Web or Function App."
Expand Down Expand Up @@ -888,6 +888,19 @@
"metadata": {
"description": "Optional. End to End Encryption Setting."
}
},
"autoGeneratedDomainNameLabelScope": {
"type": "string",
"nullable": true,
"allowedValues": [
"NoReuse",
"ResourceGroupReuse",
"SubscriptionReuse",
"TenantReuse"
],
"metadata": {
"description": "Optional. Indicates the endpoint name reuse scope. The default value is disabled."
}
}
},
"variables": {
Expand Down Expand Up @@ -966,7 +979,8 @@
"vnetImagePullEnabled": "[parameters('vnetImagePullEnabled')]",
"vnetRouteAllEnabled": "[parameters('vnetRouteAllEnabled')]",
"scmSiteAlsoStopped": "[parameters('scmSiteAlsoStopped')]",
"endToEndEncryptionEnabled": "[parameters('e2eEncryptionEnabled')]"
"endToEndEncryptionEnabled": "[parameters('e2eEncryptionEnabled')]",
"autoGeneratedDomainNameLabelScope": "[if(not(empty(parameters('autoGeneratedDomainNameLabelScope'))), parameters('autoGeneratedDomainNameLabelScope'), null())]"
}
},
"app_lock": {
Expand Down Expand Up @@ -1084,8 +1098,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "6410547302386858558"
"version": "0.33.93.31351",
"templateHash": "10907400404924884098"
},
"name": "Site App Settings",
"description": "This module deploys a Site App Setting."
Expand Down Expand Up @@ -1246,8 +1260,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "11113399312695963924"
"version": "0.33.93.31351",
"templateHash": "1129994114817101549"
},
"name": "Site Auth Settings V2 Config",
"description": "This module deploys a Site Auth Settings V2 Configuration."
Expand Down Expand Up @@ -1349,8 +1363,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "7848470524705559903"
"version": "0.33.93.31351",
"templateHash": "17967336872376441757"
},
"name": "Site logs Config",
"description": "This module deploys a Site logs Configuration."
Expand Down Expand Up @@ -1440,8 +1454,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "17229460238192107968"
"version": "0.33.93.31351",
"templateHash": "15058680643544097487"
},
"name": "Site Web Config",
"description": "This module deploys web settings configuration available under sites/config name: web."
Expand Down Expand Up @@ -1530,8 +1544,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "18138875055545072289"
"version": "0.33.93.31351",
"templateHash": "14895622660217616811"
},
"name": "Site Deployment Extension ",
"description": "This module deploys a Site extension for MSDeploy."
Expand Down Expand Up @@ -1748,8 +1762,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "12729018089714646839"
"version": "0.33.93.31351",
"templateHash": "17755083338273462514"
},
"name": "Web/Function App Deployment Slots",
"description": "This module deploys a Web or Function App Deployment Slot."
Expand Down Expand Up @@ -2784,8 +2798,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "10124842813698211071"
"version": "0.33.93.31351",
"templateHash": "9869757473830929279"
},
"name": "Site Slot App Settings",
"description": "This module deploys a Site Slot App Setting."
Expand Down Expand Up @@ -2961,8 +2975,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "7246612330843636406"
"version": "0.33.93.31351",
"templateHash": "4602741618711602070"
},
"name": "Site Slot Auth Settings V2 Config",
"description": "This module deploys a Site Auth Settings V2 Configuration."
Expand Down Expand Up @@ -3081,8 +3095,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "13728299747043713048"
"version": "0.33.93.31351",
"templateHash": "8803130402255189673"
},
"name": "Web Site Slot Basic Publishing Credentials Policies",
"description": "This module deploys a Web Site Slot Basic Publishing Credentials Policy."
Expand Down Expand Up @@ -3205,8 +3219,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "1399655044962772411"
"version": "0.33.93.31351",
"templateHash": "16445776675656358479"
},
"name": "Web/Function Apps Slot Hybrid Connection Relay",
"description": "This module deploys a Site Slot Hybrid Connection Namespace Relay."
Expand Down Expand Up @@ -3309,8 +3323,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "18138875055545072289"
"version": "0.33.93.31351",
"templateHash": "14895622660217616811"
},
"name": "Site Deployment Extension ",
"description": "This module deploys a Site extension for MSDeploy."
Expand Down Expand Up @@ -4230,8 +4244,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "7686713695944836722"
"version": "0.33.93.31351",
"templateHash": "7001118912896436334"
},
"name": "Web Site Basic Publishing Credentials Policies",
"description": "This module deploys a Web Site Basic Publishing Credentials Policy."
Expand Down Expand Up @@ -4345,8 +4359,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "6378705059063789109"
"version": "0.33.93.31351",
"templateHash": "13214417392638890300"
},
"name": "Web/Function Apps Hybrid Connection Relay",
"description": "This module deploys a Site Hybrid Connection Namespace Relay."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "13728299747043713048"
"version": "0.33.93.31351",
"templateHash": "8803130402255189673"
},
"name": "Web Site Slot Basic Publishing Credentials Policies",
"description": "This module deploys a Web Site Slot Basic Publishing Credentials Policy."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/slot/config--appsettings/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "10124842813698211071"
"version": "0.33.93.31351",
"templateHash": "9869757473830929279"
},
"name": "Site Slot App Settings",
"description": "This module deploys a Site Slot App Setting."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/slot/config--authsettingsv2/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "7246612330843636406"
"version": "0.33.93.31351",
"templateHash": "4602741618711602070"
},
"name": "Site Slot Auth Settings V2 Config",
"description": "This module deploys a Site Auth Settings V2 Configuration."
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/slot/extensions--msdeploy/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "18138875055545072289"
"version": "0.33.93.31351",
"templateHash": "14895622660217616811"
},
"name": "Site Deployment Extension ",
"description": "This module deploys a Site extension for MSDeploy."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "1399655044962772411"
"version": "0.33.93.31351",
"templateHash": "16445776675656358479"
},
"name": "Web/Function Apps Slot Hybrid Connection Relay",
"description": "This module deploys a Site Slot Hybrid Connection Namespace Relay."
Expand Down
Loading