英文:
Terraform only resolve TF_VAR values from stored environment variables in windows
问题
我正在尝试在 Terraform 中使用环境变量,使用 "TF_VAR_
环境:Windows 10
终端:命令行
脚本:
set TF_VAR_env_name = "dev"
set TF_VAR_region = "eu-west-2"
set TF_VAR_role_arn = "arn:aws:I am::....."
请帮助我提供这种会话特定的变量以运行 Terraform。谢谢。
英文:
I am trying to use env variables in terraform using "TF_VAR_<name>". It only works for permanently set environment variables. When I try to set session-specific env variables, it is not working
env: Windows 10
terminal: command line
scripts:
set TF_VAR_env_name = "dev"
set TF_VAR_region = "eu-west-2"
set TF_VAR_role_arn = "arn:aws:I am::....."
Please I need help to provide this kind of session-specific variable to run terraform. Thanks.
答案1
得分: 1
从cmd
终端中,您需要使用以下命令来设置这些环境变量:
set TF_VAR_env_name=dev
set TF_VAR_region=eu-west-2
set TF_VAR_role_arn=arn:aws:...
英文:
From a cmd
terminal, you would have to use:
set TF_VAR_env_name=dev
set TF_VAR_region=eu-west-2
set TF_VAR_role_arn=arn:aws:...
to set these environment variables.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论