BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

HashiCorp Exam Terraform-Associate-003 Topic 2 Question 13 Discussion

Actual exam question for HashiCorp's Terraform-Associate-003 exam
Question #: 13
Topic #: 2
[All Terraform-Associate-003 Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: A

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]


Contribute your Thoughts:

Alayna
6 months ago
Alright, I guess option A is the most logical choice. Makes sense the way it's structured.
upvoted 0 times
...
Shawna
6 months ago
I believe Bob and Charlie are right. The correct form usually starts with 'Data' followed by the type and name.
upvoted 0 times
...
Brittney
6 months ago
I agree with Option A seems to be in the right format.
upvoted 0 times
...
Sylvie
6 months ago
I am not so sure. Could it be option B, Vsphere_datacenter.dc.id?
upvoted 0 times
...
Juliann
6 months ago
Yeah, definitely! I think option A, Data.vsphere_datacenter.DC.id, is correct.
upvoted 0 times
...
Alayna
7 months ago
This question about referencing an attribute from vsphere_datacenter data source is crucial.
upvoted 0 times
...

Save Cancel