github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/addrs/path_attr.go (about)

     1  // Copyright (c) HashiCorp, Inc.
     2  // SPDX-License-Identifier: MPL-2.0
     3  
     4  package addrs
     5  
     6  // PathAttr is the address of an attribute of the "path" object in
     7  // the interpolation scope, like "path.module".
     8  type PathAttr struct {
     9  	referenceable
    10  	Name string
    11  }
    12  
    13  func (pa PathAttr) String() string {
    14  	return "path." + pa.Name
    15  }
    16  
    17  func (pa PathAttr) UniqueKey() UniqueKey {
    18  	return pa // A PathAttr is its own UniqueKey
    19  }
    20  
    21  func (pa PathAttr) uniqueKeySigil() {}