HashiCorp Certified: Terraform Associate — Question 297

Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example git::https://example.com/vpc.git)?

Answer options

Correct answer: A

Explanation

The correct answer is A because appending ?ref=v1.0.0 to the source path explicitly specifies the version of the module being referenced. Option B is incorrect as it does not apply to Git sources, while C is false since GitHub does not default to version 1.0.0 unless specified. Option D is also incorrect because GitHub does support versioning through tags.