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
Question
Exhibit
Options
- AData.vsphere_datacenter.dc.id
- BVsphere_datacenter.dc.id
- CData,dc,id
- DData.vsphere_datacenter,dc
How the community answered
(30 responses)- A93% (28)
- B3% (1)
- C3% (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
Community Discussion
No community discussion yet for this question.
