What are `path.module`, `path.root` and `path.cwd`?
BeginnerConceptLoops, Conditionals, Dynamic Blocks and Functions
Answer
path.module is the directory of the module containing the expression, path.root is the root module's directory, path.cwd is where Terraform was launched. Use path.module when loading files that live next to a module so it works when called from anywhere.
More on Loops, Conditionals, Dynamic Blocks and Functions
How does `count` work?BeginnerHow does `for_each` work?BeginnerWhen should you choose `for_each` over `count`?IntermediateHow do you use `for_each` with a list of objects?IntermediateWhat does "The for_each value depends on resource attributes that cannot be determined until apply" mean?AdvancedHow do you create a resource conditionally?Beginner