Can someone please explain, I have been using it but have some gap 100% understand it.
Let say I have following:
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?