命令行参数太多 Terraform 计划

Inn*_*ov 5 pipeline terraform azure-pipelines terraform-provider-azure

我是地形新手。我正在尝试通过天蓝色管道创建一个简单的存储帐户,但是当我运行管道时,出现错误“命令行参数太多”。我很震惊,我不知道我做错了什么。有人可以帮忙吗?

\n

这是我的计划脚本:

\n

\r\n
\r\n
- script:\n    terraform plan -out = plan.tfplan    \n  displayName: Terraform plan\n  workingDirectory: $(System.DefaultWorkingDirectory)/terraform\n  env:\n    ARM_CLIENT_ID: $(application_id)\n    ARM_CLIENT_SECRET: $(client_secret)\n    ARM_TENANT_ID: $(tenant_id)\n    ARM_SUBSCRIPTION_ID: $(subscription_id)\n    TF_VAR_client_id: $(application_id) \n    TF_VAR_tenant_id: $(tenant_id) \n    TF_VAR_subscription_id: $(subscription_id) \n    TF_VAR_client_secret: $(client_secret
Run Code Online (Sandbox Code Playgroud)\r\n
\r\n
\r\n

\n

我收到的错误:

\n

\r\n
\r\n
Starting: Terraform plan\n\nGenerating script.\nScript contents:\nterraform plan -out = plan.tfplan\n========================== Starting Command Output ===========================\n/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/3d07140f-ec17-4bfc-9384-a1170fae1248.sh\n\xe2\x95\xb7\n\xe2\x94\x82 Error: Too many command line arguments\n\xe2\x94\x82 \n\xe2\x94\x82 To specify a working directory for the plan, use the global -chdir flag.\n\xe2\x95\xb5\n\nFor more help on using this command, run:\n  terraform plan -help\n##[error]Bash exited with code \'1\'.\nFinishing: Terraform plan
Run Code Online (Sandbox Code Playgroud)\r\n
\r\n
\r\n

\n

Mar*_*k B 6

这有多余的空格,这是无效的:

terraform plan -out = plan.tfplan  
Run Code Online (Sandbox Code Playgroud)

它应该像下面这样:

terraform plan -out=plan.tfplan  
Run Code Online (Sandbox Code Playgroud)