mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
core: Document postconditions as valid use of self
This is not currently gated by the experiment only because it is awkward to do so in the context of evaluationStateData, which doesn't have any concept of experiments at the moment.
This commit is contained in:
@@ -296,7 +296,7 @@ func (s *Scope) evalContext(refs []*addrs.Reference, selfAddr addrs.Referenceabl
|
||||
// this codepath doesn't really "know about". If the "self"
|
||||
// object starts being supported in more contexts later then
|
||||
// we'll need to adjust this message.
|
||||
Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner and connection blocks.`,
|
||||
Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner, connection, and postcondition blocks.`,
|
||||
Subject: ref.SourceRange.ToHCL().Ptr(),
|
||||
})
|
||||
continue
|
||||
|
||||
@@ -58,7 +58,7 @@ func (d *evaluationStateData) staticValidateReference(ref *addrs.Reference, self
|
||||
// this codepath doesn't really "know about". If the "self"
|
||||
// object starts being supported in more contexts later then
|
||||
// we'll need to adjust this message.
|
||||
Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner and connection blocks.`,
|
||||
Detail: `The "self" object is not available in this context. This object can be used only in resource provisioner, connection, and postcondition blocks.`,
|
||||
Subject: ref.SourceRange.ToHCL().Ptr(),
|
||||
})
|
||||
return diags
|
||||
|
||||
Reference in New Issue
Block a user