exam questions

Exam Terraform Associate All Questions

View all questions & answers for the Terraform Associate exam

Exam Terraform Associate topic 1 question 49 discussion

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

What is the name assigned by Terraform to reference this resource?

  • A. dev
  • B. azurerm_resource_group
  • C. azurerm
  • D. test
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
tipzzz
Highly Voted 2 years, 4 months ago
Selected Answer: A
dev for sure
upvoted 16 times
...
Chuddysambo
Highly Voted 1 year, 3 months ago
the keyword here is "assigned by terraform", the correct answer is B
upvoted 13 times
vibzr2023
5 months, 2 weeks ago
"test" is the name of the resource group in Azure, while "dev" is the Terraform identifier used to reference the resource group within your Terraform code.
upvoted 7 times
...
...
YesPlease
Most Recent 1 month, 1 week ago
Selected Answer: A
Answer: DEV A resource block declares a resource of a specific type ("azurerm_resource_group") with a specific local name ("DEV"). Terraform uses the name when referring to the resource in the same module, but it has no meaning outside that module's scope.
upvoted 1 times
...
mattuyghur
7 months, 1 week ago
azurerm_resource_group
upvoted 1 times
...
hoangphan
7 months, 1 week ago
Selected Answer: A
A is the correct answer. - azurerm_resource_group is the resource type - web is the name of the defined resource
upvoted 4 times
...
Alandt
7 months, 3 weeks ago
Selected Answer: B
In Terraform, the name assigned to reference a resource is a combination of the resource type and the resource name separated by an underscore. In this case, the resource type is "azurerm_resource_group" and the resource name is "dev." Therefore, the correct answer is: B. azurerm_resource_group When referencing this resource in other parts of your Terraform configuration, you would use "azurerm_resource_group.dev" to refer to this specific resource.
upvoted 1 times
Alandt
7 months, 3 weeks ago
Chat-GTP: Why is A not the answer? Apologies for the confusion. You are correct, and I appreciate your clarification. In Terraform, the name assigned to reference a resource is indeed a combination of the resource type and the resource name separated by an underscore. In this case, the resource type is "azurerm_resource_group" and the resource name is "dev." Therefore, both A and B could be considered correct: A. dev B. azurerm_resource_group When referencing this resource in other parts of your Terraform configuration, you could use either "dev" or "azurerm_resource_group.dev" to refer to this specific resource.
upvoted 1 times
...
...
gold4otas
8 months, 2 weeks ago
Selected Answer: B
The keyword here is "assigned by terraform". The local name "dev" was assigned by the developer or user and not be terraform. However, the name assigned by terraform is "option B" = "azurerm_resource_group"
upvoted 1 times
...
Stargazer11
10 months, 1 week ago
Answer A. A typical resource identifier format in Terraform is: <PROVIDER>_<TYPE>.<NAME> <PROVIDER> is the name of the provider for the resource (e.g., "aws" for AWS resources). <TYPE> is the resource type (e.g., "instance" for an AWS EC2 instance). <NAME> is an optional name assigned to the resource instance (e.g., "my_instance").
upvoted 1 times
...
saotayo
10 months, 2 weeks ago
Selected Answer: B
"assigned by terraform', not user
upvoted 1 times
...
gofavad926
11 months, 2 weeks ago
Selected Answer: A
A, dev
upvoted 1 times
...
AWS_cert2023
1 year, 3 months ago
A is the answer. https://developer.hashicorp.com/terraform/language/resources/syntax
upvoted 2 times
Sergiuss95
1 month, 3 weeks ago
Yes, this is correct: In the following example, the aws_instance resource type is named web. The resource type and name must be unique within a module because they serve as an identifier for a given resource. resource "aws_instance" "web" { ami = "ami-a1b2c3d4" instance_type = "t2.micro" } SO: resource "resource_type" "resource_name" { # Configuration settings for the resource attribute1 = value1 attribute2 = value2 # ... }
upvoted 1 times
...
...
Beast_Hollow
1 year, 3 months ago
Selected Answer: A
Question asks what the NAME is assigned to REFERENCE this resource in your Terraform config. Resource block consists of a resource type and a reference name hence the answer is A: dev
upvoted 3 times
...
Ni33
1 year, 4 months ago
Selected Answer: A
A is the correct answer.
upvoted 2 times
...
karendavtyan
1 year, 4 months ago
Selected Answer: D
D. for sure
upvoted 1 times
...
Rezi
1 year, 4 months ago
B for sure. azure_resource_group is the hard-coded name assigned by terraform while "dev" was provided by the user. Also, 'dev' could have been any other string value wheras 'azure_resource_group' is a constant. That's how terraform recognizes that resource.
upvoted 4 times
...
Power123
1 year, 5 months ago
Answer is A - dev
upvoted 1 times
...
Midas_Tepes
1 year, 5 months ago
The answer is B, The azure_resource_group is the name given by terraform. Dev is a managed name...basically what you are calling this instance
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago