Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam Terraform Associate topic 1 question 85 discussion

Actual exam question from HashiCorp's Terraform Associate
Question #: 85
Topic #: 1
[All Terraform Associate Questions]

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?

  • A. version >= 2.1
  • B. version ~> 2.1
  • C. version = ג€<= 2.1ג€
  • D. version = ג€>= 2.1ג€
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️
Reference:
https://github.com/hashicorp/terraform-provider-null/issues/31

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
19kilo
Highly Voted 1 year, 9 months ago
Selected Answer: D
I found cleaner version of the multiple choices. A- version >= 2.1 B- version ~> 2.1 C- version = "<= 2.1" D- version = ">= 2.1" The answer is D ">= 2.1". Requires quotes I believe.
upvoted 57 times
...
smitttt
Most Recent 4 weeks ago
in 0.12 terraform version >=2.1, <3.0.0 in 0.13 or later terraform version ~> 2.1
upvoted 1 times
...
gofavad926
7 months ago
Selected Answer: D
D- version = ">= 2.1"
upvoted 2 times
...
Chrisler
7 months, 3 weeks ago
A- version >= 2.1 This option is not valid in Terraform's provider block. Terraform uses a specific version string format to specify provider versions, and this format is not compatible with the >= operator. B- version ~> 2.1 This option uses a version constraint that allows Terraform to use any version that is compatible with version 2.1, but it does not enforce using version 2.1 or greater. The ~> operator specifies that it should use a version greater than or equal to 2.1 but less than the next major version. C- version = "<= 2.1" This option constrains the provider to versions less than or equal to 2.1, which is the opposite of what you want. It limits Terraform to use versions up to and including 2.1 but not greater. D- version = ">= 2.1" This option correctly specifies that Terraform should use the GitHub provider version 2.1 or any version greater than 2.1, which matches your requirement of constraining it to version 2.1 or greater.
upvoted 4 times
...
Hp45
7 months, 3 weeks ago
The votes seem incorrect. Correct answer should be the ~ sign. See the provider block on registry page:- aws = { source = "hashicorp/aws" version = "~> 5.0"
upvoted 2 times
...
Bere
8 months ago
Selected Answer: D
A- version >= 2.1 B- version ~> 2.1 C- version = "<= 2.1" D- version = ">= 2.1" Example: provider "github" { version = ">= 2.1" # Other configurations for the provider }
upvoted 3 times
...
Mikhael1984
8 months, 2 weeks ago
For 0.12 version (1.1.x and earlier), exactly, refer https://developer.hashicorp.com/terraform/language/v1.1.x/expressions/version-constraints. = (or no operator): Allows only one exact version number. Cannot be combined with other conditions. !=: Excludes an exact version number. >, >=, <, <=: Comparisons against a specified version, allowing versions for which the comparison is true. "Greater-than" requests newer versions, and "less-than" requests older versions. ~>: Allows only the rightmost version component to increment. For example, to allow new patch releases within a specific minor release, use the full version number: ~> 1.0.4 will allow installation of 1.0.5 and 1.0.10 but not 1.1.0. This is usually called the pessimistic constraint operator.
upvoted 1 times
...
Ni33
11 months, 3 weeks ago
Selected Answer: D
D is the correct option
upvoted 1 times
...
kiran15789
11 months, 3 weeks ago
Selected Answer: D
based on 19kilo cleaner version
upvoted 2 times
...
camps
1 year ago
Selected Answer: D
. version = ">= 2.1" In Terraform, the provider block is used to configure a provider plugin that Terraform uses to interact with a specific cloud or service. The version argument in the provider block is used to constrain the version of the provider plugin that Terraform should use.
upvoted 2 times
...
Power123
1 year ago
D is correct .version = ">= 2.1"
upvoted 1 times
...
Nunyabiznes
1 year, 1 month ago
Selected Answer: D
To constrain the GitHub provider to version 2.1 or greater in a Terraform 0.12 configuration, you should use the following constraint in the provider block: D. version = ">= 2.1" This constraint indicates that the provider version must be greater than or equal to 2.1. Here's an example of how to configure this in the provider block: ``` provider "github" { version = ">= 2.1" ... } ``` This ensures that the GitHub provider used will be at least version 2.1, allowing for any version greater than or equal to 2.1.
upvoted 3 times
...
Ahmed_Elmelegy
1 year, 1 month ago
Selected Answer: D
= ">= "
upvoted 1 times
...
agmesas
1 year, 2 months ago
Selected Answer: D
D. version = ">= 2.1" (must be a literal string)
upvoted 2 times
...
InformationOverload
1 year, 3 months ago
Selected Answer: D
version = ">= 2.1"
upvoted 3 times
...
yaza
1 year, 6 months ago
A is false you should have version = ....
upvoted 2 times
...
eduvar4
1 year, 7 months ago
Selected Answer: D
https://developer.hashicorp.com/terraform/language/expressions/version-constraints
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...