I try to make a template for web app for docker. And I have the following json file:
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_docker_webscraper_name": {
"defaultValue": "docker-webscraper",
"type": "String"
},
"serverfarms_internet_suite_externalid": {
"defaultValue": "/subscriptions/fea4c865-1e54-44b3-ba1d-07315468f083/resourceGroups/rg-idn-nvwa-sas_nvwa/providers/Microsoft.Web/serverfarms/crinternetsuite",
"type": "String"
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Web/sites",
"apiVersion": "2022-03-01",
"name": "[parameters('sites_docker_webscraper_name')]",
"location": "West Europe",
"tags": {
"APM-id": "4442",
"APM-name": "SAS_NVWA",
"Clientname": "NVWA",
"Clientnumber": "tbd",
"Environment": "PRD",
"LZ-version": "V1"
},
"kind": "app,linux,container",
"properties": {
"enabled": true,
"hostNameSslStates": [
{
"name": "[concat(parameters('sites_docker_webscraper_name'), '.azurewebsites.net')]",
"sslState": "Disabled",
"hostType": "Standard"
},
{
"name": "[concat(parameters('sites_docker_webscraper_name'), '.scm.azurewebsites.net')]",
"sslState": "Disabled",
"hostType": "Repository"
}
],
"serverFarmId": "[parameters('serverfarms_internet_suite_externalid')]",
"reserved": true,
"isXenon": false,
"hyperV": false,
"vnetRouteAllEnabled": false,
"siteConfig": {
"numberOfWorkers": 1,
"linuxFxVersion": "DOCKER|crinternetsuite.azurecr.io/crinternetsuite-webscraper:latest",
"acrUseManagedIdentityCreds": false,
"alwaysOn": false,
"http20Enabled": false,
"functionAppScaleLimit": 0,
"minimumElasticInstanceCount": 0
},
"scmSiteAlsoStopped": false,
"clientAffinityEnabled": false,
"clientCertEnabled": false,
"clientCertMode": "Required",
"hostNamesDisabled": false,
"customDomainVerificationId": "A27256499C08A212DC5FD8B257022027F1FF0274BE78B8AADC345DF2C6F01FCE",
"containerSize": 0,
"dailyMemoryTimeQuota": 0,
"httpsOnly": true,
"redundancyMode": "None",
"storageAccountRequired": false,
"keyVaultReferenceIdentity": "SystemAssigned"
}
},
{
"type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/ftp')]",
"location": "West Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
],
"tags": {
"APM-id": "4442",
"APM-name": "SAS_NVWA",
"Clientname": "NVWA",
"Clientnumber": "tbd",
"Environment": "PRD",
"LZ-version": "V1"
},
"properties": {
"allow": true
}
},
{
"type": "Microsoft.Web/sites/basicPublishingCredentialsPolicies",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/scm')]",
"location": "West Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
],
"tags": {
"APM-id": "4442",
"APM-name": "SAS_NVWA",
"Clientname": "NVWA",
"Clientnumber": "tbd",
"Environment": "PRD",
"LZ-version": "V1"
},
"properties": {
"allow": true
}
},
{
"type": "Microsoft.Web/sites/config",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/web')]",
"location": "West Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
],
"tags": {
"APM-id": "4442",
"APM-name": "SAS_NVWA",
"Clientname": "NVWA",
"Clientnumber": "tbd",
"Environment": "PRD",
"LZ-version": "V1"
},
"properties": {
"numberOfWorkers": 1,
"defaultDocuments": [
"Default.htm",
"Default.html",
"Default.asp",
"index.htm",
"index.html",
"iisstart.htm",
"default.aspx",
"index.php",
"hostingstart.html"
],
"netFrameworkVersion": "v4.0",
"linuxFxVersion": "DOCKER|crinternetsuite.azurecr.io/crinternetsuite-webscraper:latest",
"requestTracingEnabled": false,
"remoteDebuggingEnabled": false,
"remoteDebuggingVersion": "VS2019",
"httpLoggingEnabled": false,
"acrUseManagedIdentityCreds": false,
"logsDirectorySizeLimit": 35,
"detailedErrorLoggingEnabled": false,
"publishingUsername": "$docker-webscraper",
"scmType": "None",
"use32BitWorkerProcess": true,
"webSocketsEnabled": false,
"alwaysOn": false,
"managedPipelineMode": "Integrated",
"virtualApplications": [
{
"virtualPath": "/",
"physicalPath": "site\wwwroot",
"preloadEnabled": false
}
],
"loadBalancing": "LeastRequests",
"experiments": {
"rampUpRules": []
},
"autoHealEnabled": false,
"vnetRouteAllEnabled": false,
"vnetPrivatePortsCount": 0,
"localMySqlEnabled": false,
"ipSecurityRestrictions": [
{
"ipAddress": "Any",
"action": "Allow",
"priority": 1,
"name": "Allow all",
"description": "Allow all access"
}
],
"scmIpSecurityRestrictions": [
{
"ipAddress": "Any",
"action": "Allow",
"priority": 1,
"name": "Allow all",
"description": "Allow all access"
}
],
"scmIpSecurityRestrictionsUseMain": false,
"http20Enabled": false,
"minTlsVersion": "1.2",
"scmMinTlsVersion": "1.2",
"ftpsState": "AllAllowed",
"preWarmedInstanceCount": 0,
"functionAppScaleLimit": 0,
"functionsRuntimeScaleMonitoringEnabled": false,
"minimumElasticInstanceCount": 0,
"azureStorageAccounts": {
"str-webcrawler": {
"type": "AzureFiles",
"accountName": "strdevinternetsuite",
"shareName": "fsndevinternetsuite",
"mountPath": "/var/www/html"
}
}
}
},
{
"type": "Microsoft.Web/sites/hostNameBindings",
"apiVersion": "2022-03-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/', parameters('sites_docker_webscraper_name'), '.azurewebsites.net')]",
"location": "West Europe",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
],
"properties": {
"siteName": "docker-webscraper",
"hostNameType": "Verified"
}
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-07-03T17_07_28_3927091')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-07-04T02_07_28_9981063')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-07-04T17_07_30_0446802')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-07-05T02_07_30_6143578')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-07-05T17_07_31_6180553')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-07-06T02_07_32_2190070')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-07-06T17_07_33_2391266')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T03_08_19_1696825')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T04_08_19_1666344')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T05_08_19_2535918')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T06_08_19_3227599')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T07_08_19_3781004')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T08_08_19_4345008')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T09_08_19_5418008')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T10_08_19_5823928')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
},
{
"type": "Microsoft.Web/sites/snapshots",
"apiVersion": "2015-08-01",
"name": "[concat(parameters('sites_docker_webscraper_name'), '/2022-08-02T11_08_19_6589523')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', parameters('sites_docker_webscraper_name'))]"
]
}
]
}
But if I look in the log files. I see this error:
{
"status": "Failed",
"error": {
"code": "ResourceNotFound",
"message": "The Resource 'Microsoft.Web/sites/internetsuite' under resource group 'rg-idn-nvwa-sas_nvwa' was not found. For more details please go to https://aka.ms/ARMResourceNotFoundFix"
}
}
But I don’t have a value internetsuite in the template. So where is this value comming from?
Thank you
And this is the pipeline(ARM template):
# Docker
# Build and push an image to Azure Container Registry
# https://learn.microsoft.com/azure/devops/pipelines/languages/docker
trigger:
- master
resources:
- repo: self
variables:
# Container registry service connection established during pipeline creation
dockerRegistryServiceConnection: 'production_internetsuite_connection'
imageRepository: 'internetsuite-webscraper'
containerRegistry: 'crinternetsuite.azurecr.io'
dockerfilePath: '**/Dockerfile'
tag: '$(Build.BuildId)'
# Agent VM image name
vmImageName: 'ubuntu-latest'
stages:
- stage: Build
displayName: Build and push stage
jobs:
- job: Build
displayName: Build
pool:
vmImage: $(vmImageName)
steps:
- task: Docker@2
displayName: Build and push an image to container registry
inputs:
command: buildAndPush
repository: $(imageRepository)
dockerfile: $(dockerfilePath)
containerRegistry: $(dockerRegistryServiceConnection)
tags: |
$(tag)
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: 'Subscription'
subscriptionId: 'fea4c865-1e54-44b3-ba1d-07315468f083'
azureResourceManagerConnection: 'spn-azure-contributor-002'
location: 'West Europe'
templateLocation: 'Linked artifact'
csmFile: '$(System.DefaultWorkingDirectory)/pipelines/templates/app-service/template.json'
csmParametersFile: '$(System.DefaultWorkingDirectory)/pipelines/templates/app-service/parameters.json'
deploymentMode: 'Incremental'
And this is my parameters.json file:
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_docker_webscraper_name": {
"value": "internetsuite"
},
"serverfarms_internet_suite_externalid": {
"value": "internetsuite"
}
}
}
2
Answers
Looks like it is coming from the second parameter.
The values are not an exact match for the error message, but the error message is more similar to the template in the question you posted yesterday.
Are you setting the parameter ‘sites_docker_webscraper_name’ in whatever is calling the arm template? if that value is ‘internetsuite’ that is where it is coming from.