Terraform and Terraform providers must use the same major version number 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

Terraform and Terraform providers must use the same major version number in a single configuration.

Explanation:
Providers are versioned independently from the Terraform core. In a single configuration you can use multiple providers that have different major versions, as long as you declare version constraints in the required_providers block and the chosen Terraform core version is compatible with those providers. When you run terraform init, Terraform selects provider versions that satisfy both the core’s constraints and each provider’s constraints. You might have one provider at major version 4 and another at major version 3 within the same config, for example, as long as the overall compatibility is maintained. Always check provider release notes for any core-version requirements, since some upgrades may require newer Terraform cores. So, it’s not necessary for Terraform and all providers to share the same major version.

Providers are versioned independently from the Terraform core. In a single configuration you can use multiple providers that have different major versions, as long as you declare version constraints in the required_providers block and the chosen Terraform core version is compatible with those providers. When you run terraform init, Terraform selects provider versions that satisfy both the core’s constraints and each provider’s constraints. You might have one provider at major version 4 and another at major version 3 within the same config, for example, as long as the overall compatibility is maintained. Always check provider release notes for any core-version requirements, since some upgrades may require newer Terraform cores. So, it’s not necessary for Terraform and all providers to share the same major version.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy