github.com/eliastor/durgaform@v0.0.0-20220816172711-d0ab2d17673e/internal/command/jsonplan/condition.go (about) 1 package jsonplan 2 3 // conditionResult is the representation of an evaluated condition block. 4 type conditionResult struct { 5 // checkAddress is the globally-unique address of the condition block. This 6 // is intentionally unexported as it is an implementation detail. 7 checkAddress string 8 9 // Address is the absolute address of the condition's containing object. 10 Address string `json:"address,omitempty"` 11 12 // Type is the condition block type, and is one of ResourcePrecondition, 13 // ResourcePostcondition, or OutputPrecondition. 14 Type string `json:"condition_type,omitempty"` 15 16 // Result is true if the condition succeeds, and false if it fails or is 17 // known only at apply time. 18 Result bool `json:"result"` 19 20 // Unknown is true if the condition can only be evaluated at apply time. 21 Unknown bool `json:"unknown"` 22 23 // ErrorMessage is the custom error for a failing condition. It is only 24 // present if the condition fails. 25 ErrorMessage string `json:"error_message,omitempty"` 26 }