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 52 discussion

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

In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.

  • A. True
  • B. False
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Bere
Highly Voted 1 year, 3 months ago
Selected Answer: A
Here's an example that demonstrates this: terraform { required_providers { aws = { source = "hashicorp/aws" version = "~> 3.0" } } } provider "aws" { region = "us-west-2" } resource "aws_instance" "example" { ami = "ami-0123456789abcdef0" instance_type = "t2.micro" } In this example, the required_providers block specifies the source and version constraints for the AWS provider. In the rest of the configuration, the provider is referred to by its local name aws, such as in the provider "aws" block and the aws_instance resource block.
upvoted 12 times
...
Eltooth
Highly Voted 2 years, 4 months ago
Selected Answer: A
A is correct answer. "Local names are module-specific, and are assigned when requiring a provider. Local names must be unique per-module. Outside of the required_providers block, Terraform configurations always refer to providers by their local names." https://www.terraform.io/language/providers/requirements#local-names
upvoted 8 times
...
BJ5
Most Recent 7 months, 2 weeks ago
Selected Answer: B
What about aliases provider "aws" { region="us-west-1" alias = "west" } resource "aws_instance" "ec2" { provider = aws.west }
upvoted 1 times
chaoscreater
6 months ago
that's still referencing the provider name "aws" first
upvoted 1 times
...
...
camps
1 year, 7 months ago
Selected Answer: A
A. True. In Terraform 0.13 and above, provider references are always specified using their local name, rather than the legacy name-based syntax used in earlier versions. The provider's local name is specified in the required_providers block, and this local name is used in all provider references in the configuration.
upvoted 1 times
...
Power123
1 year, 7 months ago
A is correct
upvoted 1 times
...
AShahine21
1 year, 11 months ago
Selected Answer: B
what about alias ? I am going to say false
upvoted 1 times
...
Chehh
2 years, 3 months ago
"Outside of the required_providers block, Terraform configurations always refer to providers by their local names." https://www.terraform.io/language/providers/requirements#local-names
upvoted 3 times
...
bigboi23
2 years, 6 months ago
Selected Answer: A
Correct! https://www.terraform.io/language/providers/requirements
upvoted 4 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 ...