Skip to content

Commit

Permalink
chore: set app setting config required for all all 3 service uris (Az…
Browse files Browse the repository at this point in the history
…ure#3721)

## Description

<!--
>Thank you for your contribution !
> Please include a summary of the change and which issue is fixed.
> Please also include the context.
> List any dependencies that are required for this change.

Fixes Azure#123
Fixes Azure#456
Closes Azure#123
Closes Azure#456
-->

Closes Azure#3207 

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.web.site](https://github.com/pankajagrawal16/bicep-registry-modules/actions/workflows/avm.res.web.site.yml/badge.svg?branch=3207%2Fadd-required-properties)](https://github.com/pankajagrawal16/bicep-registry-modules/actions/workflows/avm.res.web.site.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [x] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [x] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [ ] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Buddy <[email protected]>
  • Loading branch information
pankajagrawal16 and tsc-buddy authored Dec 2, 2024
1 parent 9bdac6a commit 0cfda08
Show file tree
Hide file tree
Showing 20 changed files with 96 additions and 70 deletions.
22 changes: 20 additions & 2 deletions avm/res/web/site/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,9 @@ module site 'br/public:avm/res/web/site:<version>' = {
value: 'false'
}
]
ftpsState: 'FtpsOnly'
linuxFxVersion: 'DOCKER|mcr.microsoft.com/appsvc/staticsite:latest'
minTlsVersion: '1.2'
}
}
}
Expand Down Expand Up @@ -872,7 +874,9 @@ module site 'br/public:avm/res/web/site:<version>' = {
"value": "false"
}
],
"linuxFxVersion": "DOCKER|mcr.microsoft.com/appsvc/staticsite:latest"
"ftpsState": "FtpsOnly",
"linuxFxVersion": "DOCKER|mcr.microsoft.com/appsvc/staticsite:latest",
"minTlsVersion": "1.2"
}
}
}
Expand Down Expand Up @@ -902,7 +906,9 @@ param siteConfig = {
value: 'false'
}
]
ftpsState: 'FtpsOnly'
linuxFxVersion: 'DOCKER|mcr.microsoft.com/appsvc/staticsite:latest'
minTlsVersion: '1.2'
}
```

Expand Down Expand Up @@ -1134,13 +1140,15 @@ module site 'br/public:avm/res/web/site:<version>' = {
scmSiteAlsoStopped: true
siteConfig: {
alwaysOn: true
ftpsState: 'FtpsOnly'
healthCheckPath: '/healthz'
metadata: [
{
name: 'CURRENT_STACK'
value: 'dotnetcore'
}
]
minTlsVersion: '1.2'
}
vnetContentShareEnabled: true
vnetImagePullEnabled: true
Expand Down Expand Up @@ -1209,13 +1217,15 @@ module site 'br/public:avm/res/web/site:<version>' = {
"siteConfig": {
"value": {
"alwaysOn": true,
"ftpsState": "FtpsOnly",
"healthCheckPath": "/healthz",
"metadata": [
{
"name": "CURRENT_STACK",
"value": "dotnetcore"
}
]
],
"minTlsVersion": "1.2"
}
},
"vnetContentShareEnabled": {
Expand Down Expand Up @@ -1270,13 +1280,15 @@ param publicNetworkAccess = 'Disabled'
param scmSiteAlsoStopped = true
param siteConfig = {
alwaysOn: true
ftpsState: 'FtpsOnly'
healthCheckPath: '/healthz'
metadata: [
{
name: 'CURRENT_STACK'
value: 'dotnetcore'
}
]
minTlsVersion: '1.2'
}
param vnetContentShareEnabled = true
param vnetImagePullEnabled = true
Expand Down Expand Up @@ -2930,6 +2942,8 @@ module site 'br/public:avm/res/web/site:<version>' = {
value: 'false'
}
]
ftpsState: 'FtpsOnly'
minTlsVersion: '1.2'
windowsFxVersion: 'DOCKER|mcr.microsoft.com/azure-app-service/windows/parkingpage:latest'
}
}
Expand Down Expand Up @@ -2970,6 +2984,8 @@ module site 'br/public:avm/res/web/site:<version>' = {
"value": "false"
}
],
"ftpsState": "FtpsOnly",
"minTlsVersion": "1.2",
"windowsFxVersion": "DOCKER|mcr.microsoft.com/azure-app-service/windows/parkingpage:latest"
}
}
Expand Down Expand Up @@ -3000,6 +3016,8 @@ param siteConfig = {
value: 'false'
}
]
ftpsState: 'FtpsOnly'
minTlsVersion: '1.2'
windowsFxVersion: 'DOCKER|mcr.microsoft.com/azure-app-service/windows/parkingpage:latest'
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "15847824660831257384"
"version": "0.31.92.45157",
"templateHash": "2026976021876048432"
},
"name": "Web Site Basic Publishing Credentials Policies",
"description": "This module deploys a Web Site Basic Publishing Credentials Policy.",
Expand Down
4 changes: 3 additions & 1 deletion avm/res/web/site/config--appsettings/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ var azureWebJobsValues = !empty(storageAccountResourceId) && !(storageAccountUse
: !empty(storageAccountResourceId) && storageAccountUseIdentityAuthentication
? union(
{ AzureWebJobsStorage__accountName: storageAccount.name },
{ AzureWebJobsStorage__blobServiceUri: storageAccount.properties.primaryEndpoints.blob }
{ AzureWebJobsStorage__blobServiceUri: storageAccount.properties.primaryEndpoints.blob },
{ AzureWebJobsStorage__queueServiceUri: storageAccount.properties.primaryEndpoints.queue },
{ AzureWebJobsStorage__tableServiceUri: storageAccount.properties.primaryEndpoints.table }
)
: {}

Expand Down
6 changes: 3 additions & 3 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.30.23.60470",
"templateHash": "10845600494881775271"
"version": "0.31.92.45157",
"templateHash": "12059034129903056117"
},
"name": "Site App Settings",
"description": "This module deploys a Site App Setting.",
Expand Down Expand Up @@ -105,7 +105,7 @@
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('appName'), 'appsettings')]",
"kind": "[parameters('kind')]",
"properties": "[union(coalesce(parameters('currentAppSettings'), createObject()), coalesce(parameters('appSettingsKeyValuePairs'), createObject()), if(and(not(empty(parameters('storageAccountResourceId'))), not(parameters('storageAccountUseIdentityAuthentication'))), createObject('AzureWebJobsStorage', format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/')), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(parameters('storageAccountResourceId'), '//'), '/')[2], split(coalesce(parameters('storageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), '2023-05-01').keys[0].value, environment().suffixes.storage)), if(and(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountUseIdentityAuthentication')), union(createObject('AzureWebJobsStorage__accountName', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), createObject('AzureWebJobsStorage__blobServiceUri', reference('storageAccount').primaryEndpoints.blob)), createObject())), if(not(empty(parameters('appInsightResourceId'))), createObject('APPLICATIONINSIGHTS_CONNECTION_STRING', reference('appInsight').ConnectionString), createObject()))]",
"properties": "[union(coalesce(parameters('currentAppSettings'), createObject()), coalesce(parameters('appSettingsKeyValuePairs'), createObject()), if(and(not(empty(parameters('storageAccountResourceId'))), not(parameters('storageAccountUseIdentityAuthentication'))), createObject('AzureWebJobsStorage', format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/')), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(parameters('storageAccountResourceId'), '//'), '/')[2], split(coalesce(parameters('storageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), '2023-05-01').keys[0].value, environment().suffixes.storage)), if(and(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountUseIdentityAuthentication')), union(createObject('AzureWebJobsStorage__accountName', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), createObject('AzureWebJobsStorage__blobServiceUri', reference('storageAccount').primaryEndpoints.blob), createObject('AzureWebJobsStorage__queueServiceUri', reference('storageAccount').primaryEndpoints.queue), createObject('AzureWebJobsStorage__tableServiceUri', reference('storageAccount').primaryEndpoints.table)), createObject())), if(not(empty(parameters('appInsightResourceId'))), createObject('APPLICATIONINSIGHTS_CONNECTION_STRING', reference('appInsight').ConnectionString), createObject()))]",
"dependsOn": [
"app",
"appInsight",
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.30.23.60470",
"templateHash": "7782125422759995841"
"version": "0.31.92.45157",
"templateHash": "8027540450131770630"
},
"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.30.23.60470",
"templateHash": "2527104715221107836"
"version": "0.31.92.45157",
"templateHash": "1970611440314801998"
},
"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.30.23.60470",
"templateHash": "18186736059685095806"
"version": "0.31.92.45157",
"templateHash": "1157890849044188513"
},
"name": "Site Api Management Config",
"description": "This module deploys a Site Api Management Configuration.",
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.30.23.60470",
"templateHash": "10249716032875912201"
"version": "0.31.92.45157",
"templateHash": "3414152511831931415"
},
"name": "Site Deployment Extension ",
"description": "This module deploys a Site extension for MSDeploy.",
Expand Down
4 changes: 2 additions & 2 deletions avm/res/web/site/hybrid-connection-namespace/relay/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "9545759447796150909"
"version": "0.31.92.45157",
"templateHash": "10816364199058461544"
},
"name": "Web/Function Apps Hybrid Connection Relay",
"description": "This module deploys a Site Hybrid Connection Namespace Relay.",
Expand Down
58 changes: 29 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.30.23.60470",
"templateHash": "15895523310817597793"
"version": "0.31.92.45157",
"templateHash": "17601733743008311306"
},
"name": "Web/Function Apps",
"description": "This module deploys a Web or Function App.",
Expand Down Expand Up @@ -1018,8 +1018,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "10845600494881775271"
"version": "0.31.92.45157",
"templateHash": "12059034129903056117"
},
"name": "Site App Settings",
"description": "This module deploys a Site App Setting.",
Expand Down Expand Up @@ -1118,7 +1118,7 @@
"apiVersion": "2023-12-01",
"name": "[format('{0}/{1}', parameters('appName'), 'appsettings')]",
"kind": "[parameters('kind')]",
"properties": "[union(coalesce(parameters('currentAppSettings'), createObject()), coalesce(parameters('appSettingsKeyValuePairs'), createObject()), if(and(not(empty(parameters('storageAccountResourceId'))), not(parameters('storageAccountUseIdentityAuthentication'))), createObject('AzureWebJobsStorage', format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/')), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(parameters('storageAccountResourceId'), '//'), '/')[2], split(coalesce(parameters('storageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), '2023-05-01').keys[0].value, environment().suffixes.storage)), if(and(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountUseIdentityAuthentication')), union(createObject('AzureWebJobsStorage__accountName', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), createObject('AzureWebJobsStorage__blobServiceUri', reference('storageAccount').primaryEndpoints.blob)), createObject())), if(not(empty(parameters('appInsightResourceId'))), createObject('APPLICATIONINSIGHTS_CONNECTION_STRING', reference('appInsight').ConnectionString), createObject()))]",
"properties": "[union(coalesce(parameters('currentAppSettings'), createObject()), coalesce(parameters('appSettingsKeyValuePairs'), createObject()), if(and(not(empty(parameters('storageAccountResourceId'))), not(parameters('storageAccountUseIdentityAuthentication'))), createObject('AzureWebJobsStorage', format('DefaultEndpointsProtocol=https;AccountName={0};AccountKey={1};EndpointSuffix={2}', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/')), listKeys(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', split(coalesce(parameters('storageAccountResourceId'), '//'), '/')[2], split(coalesce(parameters('storageAccountResourceId'), '////'), '/')[4]), 'Microsoft.Storage/storageAccounts', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), '2023-05-01').keys[0].value, environment().suffixes.storage)), if(and(not(empty(parameters('storageAccountResourceId'))), parameters('storageAccountUseIdentityAuthentication')), union(createObject('AzureWebJobsStorage__accountName', last(split(coalesce(parameters('storageAccountResourceId'), 'dummyName'), '/'))), createObject('AzureWebJobsStorage__blobServiceUri', reference('storageAccount').primaryEndpoints.blob), createObject('AzureWebJobsStorage__queueServiceUri', reference('storageAccount').primaryEndpoints.queue), createObject('AzureWebJobsStorage__tableServiceUri', reference('storageAccount').primaryEndpoints.table)), createObject())), if(not(empty(parameters('appInsightResourceId'))), createObject('APPLICATIONINSIGHTS_CONNECTION_STRING', reference('appInsight').ConnectionString), createObject()))]",
"dependsOn": [
"app",
"appInsight",
Expand Down Expand Up @@ -1182,8 +1182,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "7782125422759995841"
"version": "0.31.92.45157",
"templateHash": "8027540450131770630"
},
"name": "Site Auth Settings V2 Config",
"description": "This module deploys a Site Auth Settings V2 Configuration.",
Expand Down Expand Up @@ -1286,8 +1286,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "2527104715221107836"
"version": "0.31.92.45157",
"templateHash": "1970611440314801998"
},
"name": "Site logs Config",
"description": "This module deploys a Site logs Configuration.",
Expand Down Expand Up @@ -1381,8 +1381,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "18186736059685095806"
"version": "0.31.92.45157",
"templateHash": "1157890849044188513"
},
"name": "Site Api Management Config",
"description": "This module deploys a Site Api Management Configuration.",
Expand Down Expand Up @@ -1475,8 +1475,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "10249716032875912201"
"version": "0.31.92.45157",
"templateHash": "3414152511831931415"
},
"name": "Site Deployment Extension ",
"description": "This module deploys a Site extension for MSDeploy.",
Expand Down Expand Up @@ -1697,8 +1697,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "2418467213841620758"
"version": "0.31.92.45157",
"templateHash": "4039289806405873433"
},
"name": "Web/Function App Deployment Slots",
"description": "This module deploys a Web or Function App Deployment Slot.",
Expand Down Expand Up @@ -2678,8 +2678,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "3011151783207983935"
"version": "0.31.92.45157",
"templateHash": "13277907644137249086"
},
"name": "Site Slot App Settings",
"description": "This module deploys a Site Slot App Setting.",
Expand Down Expand Up @@ -2861,8 +2861,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "7842363652527859767"
"version": "0.31.92.45157",
"templateHash": "4125449038326941856"
},
"name": "Site Slot Auth Settings V2 Config",
"description": "This module deploys a Site Auth Settings V2 Configuration.",
Expand Down Expand Up @@ -2983,8 +2983,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "1564349757337430633"
"version": "0.31.92.45157",
"templateHash": "7770417760937550862"
},
"name": "Web Site Slot Basic Publishing Credentials Policies",
"description": "This module deploys a Web Site Slot Basic Publishing Credentials Policy.",
Expand Down Expand Up @@ -3109,8 +3109,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "12569198723769767672"
"version": "0.31.92.45157",
"templateHash": "8841665571877490324"
},
"name": "Web/Function Apps Slot Hybrid Connection Relay",
"description": "This module deploys a Site Slot Hybrid Connection Namespace Relay.",
Expand Down Expand Up @@ -3215,8 +3215,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "10249716032875912201"
"version": "0.31.92.45157",
"templateHash": "3414152511831931415"
},
"name": "Site Deployment Extension ",
"description": "This module deploys a Site extension for MSDeploy.",
Expand Down Expand Up @@ -4144,8 +4144,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "15847824660831257384"
"version": "0.31.92.45157",
"templateHash": "2026976021876048432"
},
"name": "Web Site Basic Publishing Credentials Policies",
"description": "This module deploys a Web Site Basic Publishing Credentials Policy.",
Expand Down Expand Up @@ -4260,8 +4260,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.30.23.60470",
"templateHash": "9545759447796150909"
"version": "0.31.92.45157",
"templateHash": "10816364199058461544"
},
"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.30.23.60470",
"templateHash": "1564349757337430633"
"version": "0.31.92.45157",
"templateHash": "7770417760937550862"
},
"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.30.23.60470",
"templateHash": "3011151783207983935"
"version": "0.31.92.45157",
"templateHash": "13277907644137249086"
},
"name": "Site Slot App Settings",
"description": "This module deploys a Site Slot App Setting.",
Expand Down
Loading

0 comments on commit 0cfda08

Please sign in to comment.