小编Clo*_*saz的帖子

Azure Devops - Terraform 任务失败并出现错误:无效的后端配置参数

我想在我的 azure Devops 管道上运行 terraform。我正在使用 MicrosoftDevLabs 市场上的 terraform 扩展版本 0.1.8\n我的任务如下所示:

\n
task: TerraformTaskV1@0\ndisplayName: 'Terraform - Init'\ninputs:\nprovider: 'azurerm'\ncommand: 'init'\ncommandOptions: '-input=false'\nbackendServiceArm: 'service-connection'\nbackendAzureRmResourceGroupName: 'Project-RG'\nbackendAzureRmStorageAccountName: 'projectsa'\nbackendAzureRmContainerName: 'tfstate'\nbackendAzureRmKey: 'terraform.tfstate'\nworkingDirectory: terraform\n
Run Code Online (Sandbox Code Playgroud)\n

它尝试执行的命令是

\n
`/opt/hostedtoolcache/terraform/0.13.5/x64/terraform init -backend-config=storage_account_name=projectsa -backend-config=container_name=tfstate -backend-config=key=terraform.tfstate -backend-config=resource_group_name=Project-RG -backend-config=arm_subscription_id=xxxx-xxxx-xxxx -backend-config=arm_tenant_id=*** -backend-config=arm_client_id=*** -backend-config=arm_client_secret=***\xe2\x80\x99\n
Run Code Online (Sandbox Code Playgroud)\n

错误消息是:

\n
Initializing the backend...  \nError: Invalid backend configuration argument\nThe backend configuration argument "storage_account_name" given on the command line is not expected for the selected backend type.   \nError: Invalid backend configuration argument  \nThe backend configuration argument "container_name" given on the command …
Run Code Online (Sandbox Code Playgroud)

terraform azure-devops azure-pipelines

2
推荐指数
2
解决办法
8225
查看次数

标签 统计

azure-devops ×1

azure-pipelines ×1

terraform ×1