gpt4 book ai didi

azure - 未找到资源组 'Microsoft.Web/sites/xxxxx' 下的资源 'rg-idn'

转载 作者:行者123 更新时间:2023-12-03 06:54:13 31 4
gpt4 key购买 nike

我尝试为 docker 制作一个 Web 应用程序模板。我有以下 json 文件:

{
"$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'))]"
]
}
]
}

但是如果我查看日志文件。我看到这个错误:

{
"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"
}
}

但我的模板中没有有值(value)的互联网套件。那么这个值从哪里来呢?

谢谢

这是管道(ARM 模板):

# 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'

这是我的parameters.json 文件:

{
"$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"
}
}
}

最佳答案

看起来它来自第二个参数。

这些值与错误消息不完全匹配,但错误消息与您昨天发布的问题中的模板更相似。

关于azure - 未找到资源组 'Microsoft.Web/sites/xxxxx' 下的资源 'rg-idn',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73239512/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com