nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · 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". Th

Submitted by obi.ng· Apr 18, 2026Work with Terraform Configurations

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

(30 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    93% (28)

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

#Terraform syntax#Resource blocks#Resource naming#HCL

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice