github.com/opentofu/opentofu@v1.7.1/internal/addrs/tf_attr.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 addrs
     7  
     8  // TerraformAttr is the address of an attribute of the "terraform" object in
     9  // the interpolation scope, like "terraform.workspace".
    10  type TerraformAttr struct {
    11  	referenceable
    12  	Name string
    13  }
    14  
    15  func (ta TerraformAttr) String() string {
    16  	return "terraform." + ta.Name
    17  }
    18  
    19  func (ta TerraformAttr) UniqueKey() UniqueKey {
    20  	return ta // A TerraformAttr is its own UniqueKey
    21  }
    22  
    23  func (ta TerraformAttr) uniqueKeySigil() {}