How does a module sourced from a local path differ from one sourced from the Terraform Registry in the way Terraform handles it?
- AA local module is referenced by a filesystem path and takes no version argument, whereas a registry module is referenced by a registry address and can be pinned with a version constraint. Correct
- BA local module must be downloaded during init, whereas a registry module is read directly from disk without any retrieval step.
- CA local module requires a version argument to select a release, whereas a registry module ignores any version argument supplied.
- DA local module can only define data sources, whereas a registry module can define managed resources as well.
Why A is correct: Local modules live alongside the configuration and are addressed by a relative path, so there is nothing to version, while registry modules are published releases that support a version argument for pinning.
Why B is wrong: This reverses the two. Registry modules are downloaded during init; local modules are already on disk and are simply referenced in place.
Why C is wrong: It is the registry module that honours a version argument. Local modules have no releases to choose between, so supplying version there is not how they work.
Why D is wrong: Both kinds of module can define the full range of resources, data sources, variables, and outputs. The source location does not restrict what a module may contain.