diff --git a/internal/addrs/module_call.go b/internal/addrs/module_call.go index 4e8ce34f2..709b1e302 100644 --- a/internal/addrs/module_call.go +++ b/internal/addrs/module_call.go @@ -37,6 +37,10 @@ func (c ModuleCall) Absolute(moduleAddr ModuleInstance) AbsModuleCall { } } +func (c ModuleCall) Equal(other ModuleCall) bool { + return c.Name == other.Name +} + // AbsModuleCall is the address of a "module" block relative to the root // of the configuration. // @@ -70,6 +74,10 @@ func (c AbsModuleCall) Instance(key InstanceKey) ModuleInstance { return ret } +func (c AbsModuleCall) Equal(other AbsModuleCall) bool { + return c.Module.Equal(other.Module) && c.Call.Equal(other.Call) +} + type absModuleCallInstanceKey string func (c AbsModuleCall) UniqueKey() UniqueKey {