nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-003 · Question #205

A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?

The correct answer is D. main. In Terraform, the resource name is the second argument in the resource block. The structure of a resource block is: resource "provider_resource_type" "resource_name" { # Configuration settings Here, the provider type is google_compute_instance, and the resource name is "main"…

Understand Terraform basics

Question

A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?

Options

  • Atest
  • Bgoogle
  • Ccompute_instance
  • Dmain

How the community answered

(60 responses)
  • A
    13% (8)
  • B
    8% (5)
  • C
    3% (2)
  • D
    75% (45)

Explanation

In Terraform, the resource name is the second argument in the resource block. The structure of a resource block is: resource "provider_resource_type" "resource_name" { # Configuration settings Here, the provider type is google_compute_instance, and the resource name is "main". The name "test" is simply the value assigned to the name attribute, which is unrelated to the Terraform "google" and "compute_instance" are part of the provider and resource type, not the resource

Topics

#resource block#HCL syntax#resource naming

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-003 Practice