需要从Azure Devops管道运行“ terratain taint”。我需要此原因的原因在以下链接中概述:https://github.com/terraform-providers/terraform-provider-azurerm/issues/5990,该链接基本上引用了Terraform中的一个错误,该错误阻止您破坏Azure应用服务。该线程中有人提到“我必须将功能应用标记为污点,以迫使terraform破坏我的功能应用才能应用更改: terraform taint azurerm_function_app.my_function_app“因此,我想我只能尝试查找Azure Devops的问题。这是我在流水线中的错误代码,之后,我发布了错误消息: 代码:
- task: CmdLine@2
displayName: Terraform Taint
inputs:
script: 'terraform taint [$(pfvar-app-serv)]'
错误消息:
Starting: Terraform Taint
==============================================================================
Task : Command line
Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
Version : 2.176.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
==============================================================================
Generating script.
Script contents:
terraform taint [module.create_app_services.azurerm_app_service.app-srvc-appservice.azapp-itps-dev-eastus2-02]
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /apps/AzureAgent/agent-1/_work/_temp/dd3.sh
Error: Variable name required
on line 1:
(source code not available)
Must begin with a variable name.
##[error]Bash exited with code '1'.
Finishing: Terraform Taint````