Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 13


What is the provider for this fictitious resource?

Show Answer
Correct Answer: C

In the given code snippet, the resource block is defined as "aws_vpc" which indicates the resource type for AWS Virtual Private Cloud (VPC). In Terraform, the prefix of the resource type "aws_vpc" indicates the provider. Here, "aws" is the provider responsible for managing resources on the Amazon Web Services (AWS) cloud platform. The term "main" is the local name of the resource, and "test" is the name attribute given to this specific resource instance. Therefore, the correct provider is AWS (option C).

Discussion

17 comments
Sign in to comment
softartsOption: C
May 16, 2022

C (aws)

NunyabiznesOption: C
Mar 19, 2023

In Terraform, a provider is responsible for managing resources of a particular type or a specific cloud service. In the given example, the resource type is aws_vpc which belongs to the AWS cloud platform, so the provider is specified as aws. Therefore, the correct code snippet with the provider block would be: provider "aws" { region = "us-west-2" } resource "aws_vpc" "main" { name = "test" }

cytronOption: C
Jun 2, 2022

C (aws)

mk1708Option: C
Jun 23, 2022

C (aws)

gargadityaOption: C
Mar 16, 2023

Each resource block describes one or more infrastructure objects, such as virtual networks, compute instances, or higher-level components such as DNS records. A resource block declares a resource of a given type ("aws_instance") with a given local name ("web"). The name is used to refer to this resource from elsewhere in the same Terraform module, but has no significance outside that module's scope. The resource type and name together serve as an identifier for a given resource and so must be unique within a module. Terraform usually automatically determines which provider to use based on a resource type's name. (By convention, resource type names start with their provider's preferred local name.) eg. resource "aws_instance" "web" { ami = "ami-a1b2c3d4" instance_type = "t2.micro" }

EltoothOption: C
Jun 26, 2022

C is correct answer.

alifieOption: C
Oct 14, 2022

c, aws

Sm1leyOption: C
Nov 22, 2022

C, AWS

terraformOption: C
Dec 29, 2022

C , AWS

E_awsOption: C
Jan 2, 2023

actually I see no error in the syntax https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/vpc

E_aws
Jan 2, 2023

sorry, misunderstood.. C is the correct answer

SaifwsmOption: C
Apr 15, 2023

C - AWS

gspbOption: C
Apr 30, 2023

C - aws Here, aws is the provider and aws_vpc is the resource_type

Busi57Option: C
Jul 23, 2023

i choose C

JayanthOption: C
Jul 28, 2023

C. aws

gofavad926Option: C
Sep 28, 2023

C for sure

enookOption: C
Jan 17, 2024

Answer is C. aws_vpc is "resource type", and main is "resource name".

Molly1994Option: C
Jun 1, 2024

Resource block defines all resources from its own provider. The questions is asking the provider. So answer definitely is AWS