How do commands such as terraform plan know / decide which files to use?
-help shows a DIR-OR-PLAN argument, but doesn't show how to use it:
$ terraform -help plan
Usage: terraform plan [options] [DIR-OR-PLAN]
How do I specify what files to use?
If [DIR-OR-PLAN] is omitted (e.g. terraform plan) then it defaults to the current directory.
Terraform loads all configuration files (i.e. files ending in .tf or .tf.json) within that directory in alphabetical order.
So in answer to:
How do I specify what files to use?
You must ensure only the files you wish terraform to use are in the directory.
See Load Order and Semantics for more info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With