Tfvars in terraform Lab | Terraform explained - 07 | Learn Like a pro

preview_player
Показать описание
#terraform #terraformtutorial #infrastructureascode #devops #mrdevops

Tfvars in terraform

You could set default values for all your variables and not use tfvars files at all.

Actually the objective of splitting between the definitions and the values, is to allow the definition of a common infrastructure design, and then apply specific values per environment.

Using multiple tfvars files that you give as an argument allows you to set different values per environment : secrets, VM size, number of instances, etc.



▬▬▬▬▬▬ Connect with me ▬▬▬▬▬▬
INSTAGRAM
LINKEDIN
FB
Рекомендации по теме
Комментарии
Автор

Can we have multiple .tfvars file e.g. testing.tfvars, production.tfvars etc. ? if yes? How will terraform know which values to be taken since all variables will have same name but different values?

Ghils