nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #92

How would you be able to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

The correct answer is A. Data.vsphere_datacenter.dc.id. The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration is data.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attribut

Submitted by kim_seoul· Apr 18, 2026Work with Terraform Configurations

Question

How would you be able to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

Exhibit

TERRAFORM-ASSOCIATE-004 question #92 exhibit

Options

  • AData.vsphere_datacenter.dc.id
  • BVsphere_datacenter.dc.id
  • CData,dc,id
  • DData.vsphere_datacenter,dc

How the community answered

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

Explanation

The correct way to reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration is data.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which is data.TYPE.NAME.ATTRIBUTE. In this case, the data source type is vsphere_datacenter, the data source name is dc, and the attribute we want to access is id. The other options are incorrect because they either use the wrong syntax, the wrong punctuation, or

Topics

#Data Sources#Referencing Attributes#Terraform Syntax#Expressions

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice