Do the Terraform binary version and provider versions need to match in a single configuration?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

Do the Terraform binary version and provider versions need to match in a single configuration?

Explanation:
The key idea is that the Terraform CLI binary version and provider versions are managed independently. A configuration can specify compatibility for the Terraform binary (for example with a required_version constraint) while also defining provider version constraints (with required_providers) that are resolved separately. Terraform will ensure your CLI version fits the allowed range and will pick provider versions that satisfy their constraints, recording the exact provider versions used in the dependency lock file for reproducibility. Because of this separation, the CLI binary and provider versions do not need to be identical. For instance, you can run Terraform 1.x with a provider version from the 3.x line, as long as the constraints and the lock file alignment are satisfied.

The key idea is that the Terraform CLI binary version and provider versions are managed independently. A configuration can specify compatibility for the Terraform binary (for example with a required_version constraint) while also defining provider version constraints (with required_providers) that are resolved separately. Terraform will ensure your CLI version fits the allowed range and will pick provider versions that satisfy their constraints, recording the exact provider versions used in the dependency lock file for reproducibility. Because of this separation, the CLI binary and provider versions do not need to be identical. For instance, you can run Terraform 1.x with a provider version from the 3.x line, as long as the constraints and the lock file alignment are satisfied.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy