gpt4 book ai didi

terraform - 命令行参数过多 Terraform 计划

转载 作者:行者123 更新时间:2023-12-02 01:41:12 26 4
gpt4 key购买 nike

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

这是我的计划脚本:

- script:
terraform plan -out = plan.tfplan
displayName: Terraform plan
workingDirectory: $(System.DefaultWorkingDirectory)/terraform
env:
ARM_CLIENT_ID: $(application_id)
ARM_CLIENT_SECRET: $(client_secret)
ARM_TENANT_ID: $(tenant_id)
ARM_SUBSCRIPTION_ID: $(subscription_id)
TF_VAR_client_id: $(application_id)
TF_VAR_tenant_id: $(tenant_id)
TF_VAR_subscription_id: $(subscription_id)
TF_VAR_client_secret: $(client_secret

我得到的错误:

Starting: Terraform plan

Generating script.
Script contents:
terraform plan -out = plan.tfplan
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/3d07140f-ec17-4bfc-9384-a1170fae1248.sh

│ Error: Too many command line arguments

│ To specify a working directory for the plan, use the global -chdir flag.


For more help on using this command, run:
terraform plan -help
##[error]Bash exited with code '1'.
Finishing: Terraform plan

最佳答案

这有额外的空格,这是无效的:

terraform plan -out = plan.tfplan  

应该是这样的:

terraform plan -out=plan.tfplan  

关于terraform - 命令行参数过多 Terraform 计划,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71587927/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com