【问题标题】:Terratest: Change order of passing variables in InitAndApplyTerratest:更改 InitAndApply 中传递变量的顺序
【发布时间】:2020-12-30 05:48:18
【问题描述】:

问题:https://github.com/gruntwork-io/terratest

本次通话:terraform.InitAndApply(t, terraformOptions)

解析varsvar-file 并且确实适用,我想看看是否有办法更改顺序,据我所知,我希望-var-file 先行,-var 后行, 最后一个会覆盖之前的值。

原因:文件中可能存在公共变量,用户希望在测试中根据需要覆盖它们。

当前订单:

terraform [apply -input=false -auto-approve -var prjid=demo-ecs-E9p9SV -var teamid=test -var-file xyz.tfvars -lock=false]

预期顺序:

terraform [apply -input=false -auto-approve -var-file xyz.tfvars -var prjid=demo-ecs-E9p9SV -var teamid=test -lock=false]

我在 terratest GitHub 上问过这个问题,想看看有没有人遇到过这个问题。

【问题讨论】:

    标签: terraform terraform-provider-aws terratest


    【解决方案1】:

    我想我找到了,这方面的工作正在进行中:https://github.com/gruntwork-io/terratest/pull/256

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-12-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多