What does a local module source path indicate?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

What does a local module source path indicate?

Explanation:
When Terraform sees a module source path that points to a local filesystem location, it means the module’s code lives in a directory on the machine running Terraform. Terraform will load that module directly from that directory, using it as a local module. You can use a relative path like ../modules/network or an absolute path like /home/you/terraform/modules/network. This is different from pulling a module from a remote source or registry, or trying to define a module inline within the configuration. So the local module path on the filesystem is the correct interpretation because it explicitly indicates a directory on your own machine that contains the module code to be reused.

When Terraform sees a module source path that points to a local filesystem location, it means the module’s code lives in a directory on the machine running Terraform. Terraform will load that module directly from that directory, using it as a local module. You can use a relative path like ../modules/network or an absolute path like /home/you/terraform/modules/network. This is different from pulling a module from a remote source or registry, or trying to define a module inline within the configuration.

So the local module path on the filesystem is the correct interpretation because it explicitly indicates a directory on your own machine that contains the module code to be reused.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy