MCPcopy
hub / github.com/opentofu/opentofu / Object

Method Object

internal/addrs/resource_instance_object.go:44–49  ·  view source on GitHub ↗

CurrentObject returns an [AbsResourceInstanceObject] for this resource instance, using the given [DeposedKey]. It's okay to pass [NotDeposed], but if you'd be passing that as a constant rather than as a calculated value then [AbsResourceInstance.CurrentObject] is a clearer way to communicate that i

(key DeposedKey)

Source from the content-addressed store, hash-verified

42// rather than as a calculated value then [AbsResourceInstance.CurrentObject]
43// is a clearer way to communicate that idea.
44func (ri AbsResourceInstance) Object(key DeposedKey) AbsResourceInstanceObject {
45 return AbsResourceInstanceObject{
46 InstanceAddr: ri,
47 DeposedKey: key,
48 }
49}
50
51// IsCurrent returns true if this represents the "current" object of some
52// resource instance.

Callers 15

ManagedFinalPlanMethod · 0.95
CurrentObjectMethod · 0.95
SpecTypeMethod · 0.80
TestBlock_WriteOnlyPathsFunction · 0.80
TestAttributeEmptyValueFunction · 0.80
TestBlockValueMarksFunction · 0.80
TestBlockImpliedTypeFunction · 0.80
TestObjectImpliedTypeFunction · 0.80
TestObjectSpecTypeFunction · 0.80

Calls

no outgoing calls

Tested by 15

TestBlock_WriteOnlyPathsFunction · 0.64
TestAttributeEmptyValueFunction · 0.64
TestBlockValueMarksFunction · 0.64
TestBlockImpliedTypeFunction · 0.64
TestObjectImpliedTypeFunction · 0.64
TestObjectSpecTypeFunction · 0.64
TestAttributeDecoderSpecFunction · 0.64
TestCoerceValueFunction · 0.64