kubeform.dev/terraform-backend-sdk@v0.0.0-20220310143633-45f07fe731c5/addrs/moveable.go (about)

     1  package addrs
     2  
     3  // AbsMoveable is an interface implemented by address types that can be either
     4  // the source or destination of a "moved" statement in configuration, along
     5  // with any other similar cross-module state refactoring statements we might
     6  // allow.
     7  //
     8  // Note that AbsMovable represents an absolute address relative to the root
     9  // of the configuration, which is different than the direct representation
    10  // of these in configuration where the author gives an address relative to
    11  // the current module where the address is defined. The type MoveEndpoint
    12  type AbsMoveable interface {
    13  	absMoveableSigil()
    14  	UniqueKeyer
    15  
    16  	String() string
    17  }
    18  
    19  // The following are all of the possible AbsMovable address types:
    20  var (
    21  	_ AbsMoveable = AbsResource{}
    22  	_ AbsMoveable = AbsResourceInstance{}
    23  	_ AbsMoveable = ModuleInstance(nil)
    24  	_ AbsMoveable = AbsModuleCall{}
    25  )
    26  
    27  // ConfigMoveable is similar to AbsMoveable but represents a static object in
    28  // the configuration, rather than an instance of that object created by
    29  // module expansion.
    30  //
    31  // Note that ConfigMovable represents an absolute address relative to the root
    32  // of the configuration, which is different than the direct representation
    33  // of these in configuration where the author gives an address relative to
    34  // the current module where the address is defined. The type MoveEndpoint
    35  // represents the relative form given directly in configuration.
    36  type ConfigMoveable interface {
    37  	configMoveableSigil()
    38  }
    39  
    40  // The following are all of the possible ConfigMovable address types:
    41  var (
    42  	_ ConfigMoveable = ConfigResource{}
    43  	_ ConfigMoveable = Module(nil)
    44  )