mirror of
https://github.com/hashicorp/terraform.git
synced 2026-02-18 18:29:44 -05:00
21 lines
535 B
Go
21 lines
535 B
Go
// Copyright IBM Corp. 2014, 2026
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package addrs
|
|
|
|
// ForEachAttr is the address of an attribute referencing the current "for_each" object in
|
|
// the interpolation scope, addressed using the "each" keyword, ex. "each.key" and "each.value"
|
|
type ForEachAttr struct {
|
|
referenceable
|
|
Name string
|
|
}
|
|
|
|
func (f ForEachAttr) String() string {
|
|
return "each." + f.Name
|
|
}
|
|
|
|
func (f ForEachAttr) UniqueKey() UniqueKey {
|
|
return f // A ForEachAttr is its own UniqueKey
|
|
}
|
|
|
|
func (f ForEachAttr) uniqueKeySigil() {}
|