Which configuration consistency error does Terraform validate report?

Prepare for the HashiCorp Terraform Associate Exam. Utilize flashcards and multiple-choice questions with detailed hints and explanations. Boost your confidence and be ready for success!

Multiple Choice

Which configuration consistency error does Terraform validate report?

Explanation:
In Terraform, every resource must have a unique address within a module, defined by its type and name. If you declare two resources with the same address, Terraform cannot determine which block should manage the resource and the configuration becomes ambiguous. This is a configuration consistency error, and Terraform will report it during validation or planning as a duplicate resource address. That’s why identifying duplicate resource identifiers is what Terraform flags here. The other scenarios are not treated as configuration consistency errors by validate. A mix of spaces and tabs is primarily a formatting concern and is generally resolved by formatting tools rather than flagged as a consistency error. Differences between local and remote state reflect drift between what Terraform thinks and what exists in real infrastructure, detected during plan, not in validating the static configuration. A module not being the latest version relates to version management rather than a configuration consistency issue detected by validation.

In Terraform, every resource must have a unique address within a module, defined by its type and name. If you declare two resources with the same address, Terraform cannot determine which block should manage the resource and the configuration becomes ambiguous. This is a configuration consistency error, and Terraform will report it during validation or planning as a duplicate resource address. That’s why identifying duplicate resource identifiers is what Terraform flags here.

The other scenarios are not treated as configuration consistency errors by validate. A mix of spaces and tabs is primarily a formatting concern and is generally resolved by formatting tools rather than flagged as a consistency error. Differences between local and remote state reflect drift between what Terraform thinks and what exists in real infrastructure, detected during plan, not in validating the static configuration. A module not being the latest version relates to version management rather than a configuration consistency issue detected by validation.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy