Hi Team,
Can someone please explain, I have been using it but have some gap 100% understand it.
Let say I have following:
terraform
-
modules:
- ec2:
- main.tf
- variables.tf
- ec2:
-
main.tf
-
variable.tf
I’ve main.tf, variables.tf and modules under root.
Under module, I’ve ec2 folder with main.tf and variables.tf.
Root main.tf will call modules/ec2 main.tf which will have variables passed from variables.tf. Same variables are defined in variables.tf in root folder. How this works.
Can someone please help me understand this?
Thanks.
KS