A registry module named consul for the aws provider in the hashicorp namespace contains several submodules. A team needs only the submodule stored in the module's modules/consul-cluster directory. How should the module block's source reference it?
Select an answer to reveal the explanation.
Short Explanation
That double slash is Terraform's way of saying "fetch this package, then step into this folder." A single slash just makes the registry think you've typed a longer, broken address.
Full Explanation
Terraform separates the package address from a subdirectory within it using a double slash. For a registry module, the package is the namespace, name and provider triple, and the path after the double slash selects a directory inside the downloaded package, so hashicorp/consul/aws followed by //modules/consul-cluster installs the whole module package and uses only that submodule. The version argument still applies to the package, so the submodule is pinned along with its parent. With a single slash, Terraform treats the extra segments as part of the registry address itself, which no longer matches the three-part format and fails to resolve. A query parameter named dir is not a Terraform subdirectory syntax; the double slash is the documented form for every source type, including Git and HTTP archives. Rewriting the module name as consul-cluster points at a different registry module that does not exist, and the path after it would select a directory that is not the intended submodule. Exam caveat: registries document submodules found under the modules directory of a module that follows the standard structure, so the registry page lists the available submodule paths. Operational check: run terraform init and confirm the module directory under .terraform/modules contains the whole package while the module call resolves to the consul-cluster subdirectory.