[英]AzureResourceManagerTemplateDeployment fail in Azure DevOps pipeline
I have the following task that runs an Arm Template that is tested and working in another system for creating a Management group in Azure.我有以下任务运行 Arm 模板,该模板经过测试并在另一个系统中工作,用于在 Azure 中创建管理组。 Everything is checked and it should work, but I keep giving this error:
一切都经过检查,它应该可以工作,但我一直给出这个错误:
##[error]Check out the troubleshooting guide to see if your issue is addressed: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/azure-resource-group-deployment?view=azure-devops#troubleshooting
##[error]Error: Could not find any file matching the template file pattern
What I am doing wrong?我做错了什么?
parameters:
- name: ParentId
type: string
- name: NameId
type: string
- name: DisplayName
type: string
steps:
- task: AzureResourceManagerTemplateDeployment@3
inputs:
deploymentScope: "Management Group"
azureResourceManagerConnection: ServiceConnectionName
location: "West Europe"
csmFile: "$(System.DefaultWorkingDirectory)/**/ManagementGroup.json"
csmParametersFile: "$(System.DefaultWorkingDirectory)/**/ManagementGroup.parameters.json"
overrideParameters: "-NameId ${{ parameters.NameId }} -DisplayName ${{ parameters.DisplayName }} -ParentId ${{ parameters.ParentId }}"
deploymentMode: "Incremental"
deploymentOutputs: armOutputs
I have had recently similar issue.我最近有类似的问题。 I have noticed you are using capital letters for naming your arm template.
我注意到您使用大写字母来命名您的 arm 模板。 As far as I know it should be small letters.
据我所知,它应该是小写字母。 So to solve this particular issue, you need to correct following lines:
因此,要解决此特定问题,您需要更正以下几行:
csmFile: "$(System.DefaultWorkingDirectory)/**/ManagementGroup.json"
csmParametersFile: "$(System.DefaultWorkingDirectory)/**/ManagementGroup.parameters.json"
to至
csmFile: "$(System.DefaultWorkingDirectory)/**/managementgroup.json"
csmParametersFile: "$(System.DefaultWorkingDirectory)/**/managementmroup.parameters.json"
And make your files with small letters in your repository.并在您的存储库中制作带有小写字母的文件。
That should solve the problem.那应该可以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.