[英]Is there a way to specify terraform plugins directory for terratest?
and thanks in advance.并提前感谢。
I have a practical question about terratest, with terraform I can do this:我有一个关于 terratest 的实际问题,使用 terraform 我可以这样做:
terraform init -backend-config /tmp/provider.tfvars.json -plugin-dir /opt/terra_plugins
such as, terraform leaves our company proxy alone, and does not download the plugins million times a day (we have a docker build script thingy, so we build terraform env releases into docker).例如,terraform 单独离开我们公司的代理,并且每天不下载插件百万次(我们有一个 docker 构建脚本,所以我们将 terraform env 构建到 docker 版本中)。 All in all I would like to make the same with terratest - first surprise was that even if I do terraform init before, terratest seems to use some other way than.terraform directory, it does not get the things from there - shall I aim to change this behaviour?总而言之,我想对 terratest 做同样的事情 - 第一个惊喜是,即使我之前做过 terraform 初始化,terratest 似乎使用了其他方式而不是.terraform 目录,它不会从那里得到东西 - 我的目标是改变这种行为?
Thanks a lot in advance!提前非常感谢!
terratest
has the ability to specify Options
. terratest
有能力指定Options
。 This includes BackendConfig
.这包括BackendConfig
。 -plugin-dir
is not included, but the included EnvVars
can use the terraform TF_CLI_ARGS
environment variable to specify the -plugin-dir
option. -plugin-dir
不包含在内,但包含的EnvVars
可以使用 terraform TF_CLI_ARGS
环境变量来指定-plugin-dir
选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.