ExamGecko
Question list
Search
Search

Question 14 - Terraform Associate 003 discussion

Report
Export

How could you 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?

A.
Data.vsphere_datacenter.DC.id
Answers
A.
Data.vsphere_datacenter.DC.id
B.
Vsphere_datacenter.dc.id
Answers
B.
Vsphere_datacenter.dc.id
C.
Data,dc,id
Answers
C.
Data,dc,id
D.
Data.vsphere_datacenter,dc
Answers
D.
Data.vsphere_datacenter,dc
Suggested answer: A

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 isdata.vsphere_datacenter.dc.id. This follows the syntax for accessing data source attributes, which isdata.TYPE.NAME.ATTRIBUTE. In this case, the data source type isvsphere_datacenter, the data source name isdc, and the attribute we want to access isid. The other options are incorrect because they either use the wrong syntax, the wrong punctuation, or the wrong case.Reference= [Data Source: vsphere_datacenter], [Data Source: vsphere_folder], [Expressions: Data Source Reference]

asked 18/09/2024
Nathan Davies
38 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first