HashiCorp Certified: Terraform Associate — Question 52
You need to constrain the GitHub provider to version 2.1 or greater.
Which of the following should you put into the Terraform 0.12 configuration's provider block?
Answer options
- A. version >= 2.1
- B. version ~> 2.1
- C. version = ג€<= 2.1ג€
- D. version = ג€>= 2.1ג€
Correct answer: D
Explanation
The correct answer, D, specifies that the version must be greater than or equal to 2.1, which meets the requirement. Option A is incorrect as it doesn't follow the correct syntax for a provider block. Option B uses a pessimistic constraint which could allow versions lower than 2.1. Option C incorrectly uses the less than or equal operator, which does not satisfy the requirement.