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

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