Terraform Associate (004) · Free practice question 9 of 12
terraform_data triggers_replace argument
Marrow Games wants a terraform_data resource, used to run a setup step, to be replaced whenever var.schema_version changes. Which argument achieves this?
- A.triggers_replace = var.schema_version
- B.input = var.schema_version
- C.depends_on = [var.schema_version]
- D.lifecycle { ignore_changes = [var.schema_version] }
Show answer and explanation
Correct answer: A. triggers_replace = var.schema_version
Why: terraform_data's triggers_replace argument holds a value that, when changed, causes the resource to be replaced. The input argument is stored and returned as output, but changing it does not force replacement. depends_on expects resource or module references, and ignore_changes takes the resource's own attributes, not variables.
More free Terraform Associate (004) questions
- Skipping refresh during plan
- Local state backup file
- Default CLI workspace cannot be deleted
- Local execution mode in HCP Terraform
- Self-hosted agents for private networks
- Run triggers between workspaces
- Health assessments for drift detection
- Dynamic provider credentials with OIDC
- Provisioners as a last resort
- Running tests with terraform test
- Lock file hashes for multiple platforms