[英]Terratest: Change order of passing variables in InitAndApply
Question on: https://github.com/gruntwork-io/terratest问题: https : //github.com/gruntwork-io/terratest
This call: terraform.InitAndApply(t, terraformOptions)
这个调用: terraform.InitAndApply(t, terraformOptions)
parses vars
and var-file
and does apply, I want to see if there is a way to change the order, I want -var-file
to go first and -var
to go after, as far as I know, the last one overrides the previous value.解析vars
和var-file
并且确实适用,我想看看是否有办法更改顺序,我希望-var-file
先行, -var
后行,据我所知,最后一个覆盖之前的值。
The reason: there can be common variables in the file and a user would want to override them as needed in tests.原因:文件中可能有公共变量,用户希望在测试中根据需要覆盖它们。
Current order:当前订单:
terraform [apply -input=false -auto-approve -var prjid=demo-ecs-E9p9SV -var teamid=test -var-file xyz.tfvars -lock=false]
Expected order:预期顺序:
terraform [apply -input=false -auto-approve -var-file xyz.tfvars -var prjid=demo-ecs-E9p9SV -var teamid=test -lock=false]
I have asked this question in terratest GitHub, want to see if anyone has faced this.我在 terratest GitHub 上问过这个问题,想看看有没有人遇到过这个问题。
我想我找到了,这方面的工作正在进行中: https : //github.com/gruntwork-io/terratest/pull/256
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.