TERRAFORM-ASSOCIATE-003 · Question #75
Which configuration consistency errors does terraform validate report?
The correct answer is C. Declaring a resource identifier more than once. Terraform validate reports configuration consistency errors, such as declaring a resource identifier more than once. This means that the same resource type and name combination is used for multiple resource blocks, which is not allowed in Terraform. For example, resource…
Question
Which configuration consistency errors does terraform validate report?
Options
- ATerraform module isn't the latest version
- BDifferences between local and remote state
- CDeclaring a resource identifier more than once
- DA mix of spaces and tabs in configuration files
How the community answered
(20 responses)- A5% (1)
- B10% (2)
- C80% (16)
- D5% (1)
Explanation
Terraform validate reports configuration consistency errors, such as declaring a resource identifier more than once. This means that the same resource type and name combination is used for multiple resource blocks, which is not allowed in Terraform. For example, resource "aws_instance" "example" {...} cannot be used more than once in the same configuration. Terraform validate does not report errors related to module versions, state differences, or formatting issues, as these are not relevant for checking the configuration syntax and structure.
Topics
Community Discussion
No community discussion yet for this question.