If a local module is specified with source = "./module", what kind of module is this?

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

If a local module is specified with source = "./module", what kind of module is this?

Explanation:
A local module on disk. The source attribute tells Terraform where to fetch the module from, and a relative path like ./module points to a directory on your local filesystem that contains a separate Terraform module (its own set of resources, variables, and outputs). Terraform treats that directory as a distinct module that you can reference from the root module. This differs from remote modules, which come from a registry or a Git repository, specified with URLs or registry addresses, and from an inline module, which isn’t a supported module source in Terraform.

A local module on disk. The source attribute tells Terraform where to fetch the module from, and a relative path like ./module points to a directory on your local filesystem that contains a separate Terraform module (its own set of resources, variables, and outputs). Terraform treats that directory as a distinct module that you can reference from the root module.

This differs from remote modules, which come from a registry or a Git repository, specified with URLs or registry addresses, and from an inline module, which isn’t a supported module source in Terraform.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy