nerdexam
HashiCorp

TA-002-P · Question #390

Which of the following is a meta-argument defined in the configuration files of Terraform?

The correct answer is B. depends_on. depends_on is a recognized Terraform meta-argument used within resource and module blocks to declare explicit dependencies that Terraform cannot automatically infer from expressions.

Read, generate, and modify configuration

Question

Which of the following is a meta-argument defined in the configuration files of Terraform?

Options

  • Atfvar
  • Bdepends_on
  • Cinstance aws
  • Dvarl

How the community answered

(20 responses)
  • B
    90% (18)
  • C
    5% (1)
  • D
    5% (1)

Why each option

depends_on is a recognized Terraform meta-argument used within resource and module blocks to declare explicit dependencies that Terraform cannot automatically infer from expressions.

Atfvar

tfvar is a file extension (.tfvars) used for variable definition files, not a meta-argument defined within configuration blocks.

Bdepends_onCorrect

depends_on is a built-in meta-argument in Terraform that can be placed inside any resource or module block to force Terraform to create or destroy resources in a specific order when the dependency cannot be detected automatically. It is part of the set of recognized meta-arguments alongside count, for_each, provider, and lifecycle.

Cinstance aws

'instance aws' is not a valid Terraform keyword, meta-argument, or configuration construct of any kind.

Dvarl

'varl' is not a valid Terraform meta-argument or any recognized Terraform keyword.

Concept tested: Terraform meta-arguments and explicit dependency management

Source: https://developer.hashicorp.com/terraform/language/meta-arguments/depends_on

Topics

#Terraform configuration#Meta-arguments#Dependencies#depends_on

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice