Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 202

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?

    Correct Answer: D

    To reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource, the correct syntax follows the format data.<TYPE>.<NAME>.<ATTRIBUTE>. In this case, the type is vsphere_datacenter, the name is dc, and the attribute we want to reference is id. Therefore, the correct reference is data.vsphere_datacenter.dc.id.

Discussion
resnefOption: D

data.<TYPE>.<NAME>.<ATTRIBUTE>

mamoon_malta2022Option: D

D: data "azurerm_resource_group" "example" { name = "existing" } output "id" { value = data.azurerm_resource_group.example.id }

InformationOverloadOption: D

D is correct

ArizonaClassicsOption: D

I will go for D

nakikooOption: D

yea correct, D, provider.resourcetype.name.id