Terraform Associate Practice Exam

Question: 1 / 400

You need to constrain the GitHub provider to version 2.1 or greater. What should you include in the Terraform 0.12 configuration's provider block?

version = ">= 2.1"

The correct configuration for constraining the GitHub provider to version 2.1 or greater is to use the syntax `version = ">= 2.1"`. This notation is specific to Terraform’s requirement for defining provider versions and follows semantic versioning guidelines.

The syntax `">= 2.1"` clearly specifies that the version must be 2.1 or any higher version, ensuring compatibility with any features or fixes introduced in subsequent versions. This is crucial in maintaining the functionality of your infrastructure as code without risking compatibility issues from using older, unsupported versions.

Other options provided do not effectively convey the required constraint. For example, specifying `version = ">= 1.0"` would allow versions that are much older than 2.1 and does not meet the requirement to be specifically at least version 2.1. The phrase `version = "2.1 or above"` is less formal and does not conform to the syntax used in Terraform for version constraints, making it invalid. Lastly, the choice of `version = ">= 2.0.0"` would also allow versions lower than 2.1, which does not fulfill the requirement you are aiming to enforce.

This precision in specifying version constraints is crucial for

Get further explanation with Examzify DeepDiveBeta

version = ">= 1.0"

version = "2.1 or above"

version = ">= 2.0.0"

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy