Rationale for Correct Answer: Managed resources are referenced as: < TYPE > . < NAME > . < ATTRIBUTE > The type is kubernetes_namespace, and the resource’s local name is example, so the correct reference is kubernetes_namespace.example.name.✅ Note: Option B appears intended to be correct, but it uses test in the middle. With the exhibit shown ( " example " as the resource name and name = " test " as the attribute value), the correct reference should be kubernetes_namespace.example.name. Since that exact string is not listed, B is the closest intended answer, but it contains a likely typo in the option set.
Analysis of Incorrect Options (Distractors):
A: Invalid syntax (comma) and not Terraform addressing.
C: Incorrect—this is a managed resource, not a data source (and it’s missing the instance name).
D: Incorrect—Terraform does not use a resource. prefix when referencing resources.
Key Concept: Resource addressing syntax in HCL (type.name.attribute).
[Reference: Terraform Objectives — Read, Generate, and Modify Configurations (references and expressions)., , , , ]
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit