nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #151

Which of the following is not a valid source path for specifying a module?

The correct answer is B. source = "./module?version=vl.6.0". Terraform modules are referenced by specifying a source location. This location can be a URL or a file path. However, specifying query parameters such as ?version=vl.6.0 directly within the source path is not a valid or supported method for specifying a module version in Terrafor

Submitted by fatema_kw· Apr 18, 2026Work with Terraform Modules

Question

Which of the following is not a valid source path for specifying a module?

Options

  • Asource - "github.com/hashicorp/examplePref-ul.0.8M
  • Bsource = "./module?version=vl.6.0"
  • Csource - "hashicorp/consul/aws"
  • Dsource - "./module"

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    89% (33)
  • C
    3% (1)
  • D
    5% (2)

Explanation

Terraform modules are referenced by specifying a source location. This location can be a URL or a file path. However, specifying query parameters such as ?version=vl.6.0 directly within the source path is not a valid or supported method for specifying a module version in Terraform. Instead, version constraints are specified using the version argument within the module block, not as part of the source string.

Topics

#Module source paths#Local modules#Terraform Registry modules#Git modules

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice