mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
add Module method for module name only
This commit is contained in:
@@ -184,3 +184,9 @@ func (m *Module) formatWithPrefix(hostPrefix string, preserveCase bool) string {
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
// Module returns just the registry ID of the module, without a hostname or
|
||||
// suffix.
|
||||
func (m *Module) Module() string {
|
||||
return fmt.Sprintf("%s/%s/%s", m.RawNamespace, m.RawName, m.RawProvider)
|
||||
}
|
||||
|
Reference in New Issue
Block a user