mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
addrs: ModuleInstanceStep.String
When ModuleInstanceStep values appear alone in debug messages, it's easier to read them in a compact, HCL-like form than as the default struct printing style.
This commit is contained in:
parent
678760b61a
commit
9f727b5799
@ -413,3 +413,10 @@ func (m ModuleInstance) TargetContains(other Targetable) bool {
|
||||
func (m ModuleInstance) targetableSigil() {
|
||||
// ModuleInstance is targetable
|
||||
}
|
||||
|
||||
func (s ModuleInstanceStep) String() string {
|
||||
if s.InstanceKey != NoKey {
|
||||
return s.Name + s.InstanceKey.String()
|
||||
}
|
||||
return s.Name
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user