mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
24 lines
530 B
Go
24 lines
530 B
Go
// Copyright (c) The OpenTofu Authors
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package addrs
|
|
|
|
// PathAttr is the address of an attribute of the "path" object in
|
|
// the interpolation scope, like "path.module".
|
|
type PathAttr struct {
|
|
referenceable
|
|
Name string
|
|
}
|
|
|
|
func (pa PathAttr) String() string {
|
|
return "path." + pa.Name
|
|
}
|
|
|
|
func (pa PathAttr) UniqueKey() UniqueKey {
|
|
return pa // A PathAttr is its own UniqueKey
|
|
}
|
|
|
|
func (pa PathAttr) uniqueKeySigil() {}
|