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

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 139 discussion

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

You are creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog.
Which of the following provider blocks would allow you to do this?
A.

B.

C.

Show Suggested Answer Hide Answer
Suggested Answer: B

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
keiffo2
Highly Voted 2 years, 2 months ago
I think B is correct as you are configuring the provider not declaring it terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 4.0" } } } # Configure the AWS Provider provider "aws" { region = "us-east-1" }
upvoted 16 times
...
depal_dhir
Highly Voted 2 years, 2 months ago
B is correct https://www.terraform.io/language/providers/configuration
upvoted 8 times
...
sjokkorein
Most Recent 7 months, 2 weeks ago
*CREATING* then it should be C as you need the root terraform block
upvoted 2 times
8876ca1
5 months ago
Provider block doesnt belong inside the terraform block :D
upvoted 1 times
...
...
alen995454
10 months, 1 week ago
The question seems to hinge on the word "needs" ... if it was asking for "required_providers" then they would need to nested inside a terraform block however none of the examples show the correct syntax for a required_providers block terraform { required_providers { mycloud = { source = "mycorp/mycloud" version = "~> 1.0" } } } I'm going with B.
upvoted 1 times
...
Spandrop
11 months, 1 week ago
Question says "you are creating" your configuration, not configuring. It should be C
upvoted 1 times
Spandrop
11 months, 1 week ago
well paying more attention in the alternatives, I think none is correct
upvoted 1 times
...
...
Tyler2023
1 year ago
https://developer.hashicorp.com/terraform/language/providers/requirements
upvoted 1 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 ...