nerdexam
HashiCorp

TA-002-P · Question #59

Terraform provisioners can be added to any resource block.

The correct answer is A. True. Terraform provisioners are mechanisms for executing scripts or commands on a local or remote machine as part of a resource's lifecycle management. They can be attached to any resource block to perform actions immediately after resource creation or before its destruction.

Read, generate, and modify configuration

Question

Terraform provisioners can be added to any resource block.

Options

  • ATrue
  • BFalse

How the community answered

(24 responses)
  • A
    88% (21)
  • B
    13% (3)

Why each option

Terraform provisioners are mechanisms for executing scripts or commands on a local or remote machine as part of a resource's lifecycle management. They can be attached to any resource block to perform actions immediately after resource creation or before its destruction.

ATrueCorrect

Provisioners are specified within a 'resource' block or a 'null_resource' block in Terraform configuration. This allows them to interact with the resource instances they are associated with, such as installing software on a created VM instance.

BFalse

Concept tested: Terraform provisioner placement

Source: https://developer.hashicorp.com/terraform/language/resources/provisioners/syntax

Topics

#provisioners#resource blocks#configuration syntax

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice