命令行参数过多 Terraform 计划
Too many command line arguments Terraform plan
我是 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 的新手。我正在尝试通过 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