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

How would you reference the attribute "name" of this fictitious resource in HCL?

    Correct Answer: C

    To reference the attribute 'name' of the resource 'kubernetes_namespace' named 'example' in HCL (HashiCorp Configuration Language), the correct syntax is 'kubernetes_namespace.example.name'. This follows the standard format: resource_type.resource_name.attribute_name.

Discussion
HizumiOption: C

Correct answer is C. References to Resource Attributes Doc: https://www.terraform.io/language/expressions/references#references-to-resource-attributes

depal_dhirOption: C

https://www.terraform.io/language/expressions/references#references-to-resource-attributes

InformationOverloadOption: C

C looks fine to me!

090200fOption: C

C is correct answer no need to spllly mention resource here

tychoOption: C

Answer C; that would be the equivalent to kubectl create ns :)