実現したいこと
Azure App Service の環境変数の設定を
ARMテンプレートに追加したいです。
必要な情報がありましたら、追記しますので
ご教授願います。
前提
下記の環境設定をARMテンプレートに追加したいのですが、
書き方が分かりません。
追加したい設定
MODULE /app/test.py
該当のソースコード
ARMテンプレート
1 2{ 3 "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", 4 "contentVersion": "1.0.0.0", 5 "metadata": { 6 "_generator": { 7 "name": "bicep", 8 "version": "0.5.6.12127", 9 "templateHash": "10602523904429381366" 10 } 11 }, 12 "parameters": { 13 "webAppName": { 14 "type": "string", 15 "defaultValue": "[format('webApp-{0}', uniqueString(resourceGroup().id))]", 16 "minLength": 2, 17 "metadata": { 18 "description": "Web app name." 19 } 20 }, 21 "location": { 22 "type": "string", 23 "defaultValue": "[resourceGroup().location]", 24 "metadata": { 25 "description": "Location for all resources." 26 } 27 }, 28 "sku": { 29 "type": "string", 30 "defaultValue": "F1", 31 "metadata": { 32 "description": "The SKU of App Service Plan." 33 } 34 }, 35 "linuxFxVersion": { 36 "type": "string", 37 "defaultValue": "DOTNETCORE|3.0", 38 "metadata": { 39 "description": "The Runtime stack of current web app" 40 } 41 }, 42 "repoUrl": { 43 "type": "string", 44 "defaultValue": " ", 45 "metadata": { 46 "description": "Optional Git Repo URL" 47 } 48 } 49 }, 50 "variables": { 51 "appServicePlanPortalName": "[format('AppServicePlan-{0}', parameters('webAppName'))]" 52 }, 53 "resources": [ 54 { 55 "type": "Microsoft.Web/serverfarms", 56 "apiVersion": "2021-02-01", 57 "name": "[variables('appServicePlanPortalName')]", 58 "location": "[parameters('location')]", 59 "sku": { 60 "name": "[parameters('sku')]" 61 }, 62 "kind": "linux", 63 "properties": { 64 "reserved": true 65 } 66 }, 67 { 68 "type": "Microsoft.Web/sites", 69 "apiVersion": "2021-02-01", 70 "name": "[parameters('webAppName')]", 71 "location": "[parameters('location')]", 72 "properties": { 73 "httpsOnly": true, 74 "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]", 75 "siteConfig": { 76 "linuxFxVersion": "[parameters('linuxFxVersion')]", 77 "minTlsVersion": "1.2", 78 "ftpsState": "FtpsOnly" 79 } 80 }, 81 "identity": { 82 "type": "SystemAssigned" 83 }, 84 "dependsOn": [ 85 "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanPortalName'))]" 86 ] 87 }, 88 { 89 "condition": "[contains(parameters('repoUrl'), 'http')]", 90 "type": "Microsoft.Web/sites/sourcecontrols", 91 "apiVersion": "2021-02-01", 92 "name": "[format('{0}/{1}', parameters('webAppName'), 'web')]", 93 "properties": { 94 "repoUrl": "[parameters('repoUrl')]", 95 "branch": "master", 96 "isManualIntegration": true 97 }, 98 "dependsOn": [ 99 "[resourceId('Microsoft.Web/sites', parameters('webAppName'))]" 100 ] 101 } 102 ] 103} 104

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2023/03/12 14:08