Source Argument — HashiCorp Terraform Associate (003) Practice Questions
The `source` argument inside a `module` block tells Terraform where to find the module code, and its value determines whether Terraform fetches the module from a local path, the Terraform Registry, a Git repository, or another supported location. The value of `source` is interpreted during `terraform init`, which downloads and caches the module. The Terraform Associate exam tests the valid source address formats, including registry addresses, GitHub URLs, and local file paths, and the requirement to re-run `init` when the source changes.
Free questions on source argument
A Terraform engineer wants to reuse a set of resource definitions across multiple environments without duplicating code. The engineer should package the configuration as a module stored in a private registry. When calling the module, which argument specifies the module's source location in a Terraform Registry?
Free question · easy · full answer + explanation
More source argument questions in the full bank
- What is the difference between source constraints for modules and version constraints for providers? Unlock answer & explanation →