Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 245


Which of the following should you put into the required_providers block?

Show Answer
Correct Answer: BC

The correct syntax for specifying a version in the required_providers block is to use a string. Therefore, the appropriate format for setting the version constraint 'greater than or equal to 3.1' is 'version = ">= 3.1"'. The other options do not correctly follow the syntax requirements for the version parameter.

Discussion

11 comments
Sign in to comment
sdm13168Option: B
May 8, 2023

B https://developer.hashicorp.com/terraform/language/providers/requirements

Oleg_golOption: C
May 6, 2023

I choose "С"

MarshalLawOption: B
May 9, 2023

B since this syntax is correct. If you go back to the previous questions you'll see a screenshot where a relevant question is being asked.

Tronko86Option: B
Nov 4, 2023

B is the only answer with a correct syntax: version parameter wants a string

Oleg_golOption: A
May 6, 2023

A and C - correct (

SathisgmOption: B
May 9, 2023

I choose B

arun00028Option: C
Oct 15, 2023

C is correct

arun00028Option: C
Oct 18, 2023

C is the answer

bajwa360
Oct 24, 2023

terraform { required_providers { mycloud = { source = "mycorp/mycloud" version = "~> 1.0" } } }

AlandtOption: B
Jan 24, 2024

B is correct, others have wrong syntax

bella
May 29, 2024

well B and C are correct. the question isn't clear about required provider... did they mean terraform version or hashicorp provider terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 5.42" } } required_version = ">= 1.2.0" }