mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-18 18:29:44 -05:00
addrs: ModuleInstance.Module
This returns the address of the module that the module instance is an instance of.
This commit is contained in:
parent
9f727b5799
commit
657f9502e4
1 changed files with 13 additions and 0 deletions
|
|
@ -410,6 +410,19 @@ func (m ModuleInstance) TargetContains(other Targetable) bool {
|
|||
}
|
||||
}
|
||||
|
||||
// Module returns the address of the module that this instance is an instance
|
||||
// of.
|
||||
func (m ModuleInstance) Module() Module {
|
||||
if len(m) == 0 {
|
||||
return nil
|
||||
}
|
||||
ret := make(Module, len(m))
|
||||
for i, step := range m {
|
||||
ret[i] = step.Name
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
func (m ModuleInstance) targetableSigil() {
|
||||
// ModuleInstance is targetable
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue