A data source selects the most recent image for an application, and the image must be built for the x86_64 architecture. If the source returns any other architecture, the run must fail with a clear message before instances are created from it. Which configuration does that?
Select an answer to reveal the explanation.
Short Explanation
A postcondition is the inspector at the end of the conveyor belt: the data source reads the image, then the inspector checks it before anything downstream uses it. self is how the inspector points at what just came off the line. Your trap is the precondition, which runs before the read, when there's nothing to point at.
Full Explanation
Postconditions validate the result of a resource or data source after Terraform has read or applied it. In a postcondition, the special symbol self refers to the object's own attributes, so condition = self.architecture == "x86_64" with an error_message checks the selected image. Because data sources are usually read during planning, a failure stops the run with that message, and resources that depend on the image are never created. HashiCorp's documentation uses this exact pattern for image architecture checks. A precondition is evaluated before the object is read or created, so it cannot refer to self; it is meant for assumptions about inputs rather than guarantees about results. Validation blocks belong to input variables only; a data source has no validation block. A check block reports a warning when its assertion fails and lets the run continue, so instances would still be created from the wrong image. Exam caveat: when a data source depends on values unknown until apply, its postcondition is evaluated during apply instead of plan, which still blocks dependent resources. Operational check: point the filter at an image of another architecture in a test workspace and confirm terraform plan stops with the postcondition's error message.