Preparing Practice Exam…
Please wait a moment while the system generates the exam questions, answers, and study session.
Please wait a moment while the system generates the exam questions, answers, and study session.
HashiCorp Certified: Terraform Associate (003) · HashiCorp
Select one answer.
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Answer is B - False. While provisioners are most commonly nested inside a standard resource block, they can also be nested inside a null_resource or terraform_data block. These resource types are explicitly designed to run provisioners that do not associate directly with a physical cloud resource.
Definitely A as provisioners are executed as part of the create and destroy phases of the resource lifecycle. They cannot exist independently outside of a resource block. If you decide to define a provisioner outside of a resource block , terraform with throw a syntax error.
Answer is A: True Multiple provisioners can be specified within a resource. Multiple provisioners are executed in the order they're defined in the configuration file. https://developer.hashicorp.com/terraform/language/resources/provisioners/syntax resource "aws_instance" "web" { # ... provisioner "local-exec" { command = "echo first" } provisioner "local-exec" { command = "echo second" } }