【发布时间】:2022-02-02 01:06:41
【问题描述】:
我打算在我的 azure Devops 管道上运行 terraform。我正在使用 MicrosoftDevLabs 市场上的 terraform 扩展版本 0.1.8 我的任务如下所示:
task: TerraformTaskV1@0
displayName: 'Terraform - Init'
inputs:
provider: 'azurerm'
command: 'init'
commandOptions: '-input=false'
backendServiceArm: 'service-connection'
backendAzureRmResourceGroupName: 'Project-RG'
backendAzureRmStorageAccountName: 'projectsa'
backendAzureRmContainerName: 'tfstate'
backendAzureRmKey: 'terraform.tfstate'
workingDirectory: terraform
它试图执行的命令是
`/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=***’
错误信息是:
Initializing the backend...
Error: Invalid backend configuration argument
The backend configuration argument "storage_account_name" given on the command line is not expected for the selected backend type.
Error: Invalid backend configuration argument
The backend configuration argument "container_name" given on the command line is not expected for the selected backend type.
Error: Invalid backend configuration argument
The backend configuration argument "key" given on the command line is not expected for the selected backend type.
【问题讨论】:
-
可以粘贴错误信息吗?
-
您好,错误是这样的:
Initializing the backend... Error: Invalid backend configuration argument The backend configuration argument "storage_account_name" given on the command line is not expected for the selected backend type. Error: Invalid backend configuration argument The backend configuration argument "container_name" given on the command line is not expected for the selected backend type. Error: Invalid backend configuration argument The backend configuration argument "key" given on the command line is not expected for the selected backend type.
标签: azure-devops terraform azure-pipelines