github.com/opentofu/opentofu@v1.7.1/internal/tofu/graph_interface_subgraph.go (about)

     1  // Copyright (c) The OpenTofu Authors
     2  // SPDX-License-Identifier: MPL-2.0
     3  // Copyright (c) 2023 HashiCorp, Inc.
     4  // SPDX-License-Identifier: MPL-2.0
     5  
     6  package tofu
     7  
     8  import (
     9  	"github.com/opentofu/opentofu/internal/addrs"
    10  )
    11  
    12  // GraphNodeModuleInstance says that a node is part of a graph with a
    13  // different path, and the context should be adjusted accordingly.
    14  type GraphNodeModuleInstance interface {
    15  	Path() addrs.ModuleInstance
    16  }
    17  
    18  // GraphNodeModulePath is implemented by all referenceable nodes, to indicate
    19  // their configuration path in unexpanded modules.
    20  type GraphNodeModulePath interface {
    21  	ModulePath() addrs.Module
    22  }