TA-002-P · Question #213
Taint the resource "aws_instance" "baz" resource that lives in module bar which lives in module foo.
The correct answer is C. terraform taint module.foo.module.bar.aws_instance.baz. When a resource lives inside nested modules, the full path must reference each module layer using the 'module.' prefix. The correct syntax is: terraform taint module.foo.module.bar.aws_instance.baz. Option A omits the resource type. Option B omits 'module.' before bar. Option D o
Question
Taint the resource "aws_instance" "baz" resource that lives in module bar which lives in module foo.
Options
- Aterraform taint module.foo.module.bar.baz
- Bterraform taint module.foo.bar.aws_instance.baz
- Cterraform taint module.foo.module.bar.aws_instance.baz
- Dterraform taint foo.bar.aws_instance.baz
How the community answered
(24 responses)- B13% (3)
- C83% (20)
- D4% (1)
Explanation
When a resource lives inside nested modules, the full path must reference each module layer using the 'module.' prefix. The correct syntax is: terraform taint module.foo.module.bar.aws_instance.baz. Option A omits the resource type. Option B omits 'module.' before bar. Option D omits all 'module.' prefixes entirely.
Topics
Community Discussion
No community discussion yet for this question.