TA-002-P · Question #32
A Terraform provisioner must be nested inside a resource configuration block.
The correct answer is A. True. Provisioners in Terraform must always be declared as a nested block inside a resource configuration block. They cannot exist at the top level of a module or independently. This scoping is by design - provisioners execute in the context of the resource they are attached to, either
Question
A Terraform provisioner must be nested inside a resource configuration block.
Options
- ATrue
- BFalse
How the community answered
(38 responses)- A87% (33)
- B13% (5)
Explanation
Provisioners in Terraform must always be declared as a nested block inside a resource configuration block. They cannot exist at the top level of a module or independently. This scoping is by design - provisioners execute in the context of the resource they are attached to, either during creation or destruction of that specific resource.
Topics
Community Discussion
No community discussion yet for this question.