opentofu/internal/addrs/count_attr.go
2023-05-02 15:33:06 +00:00

22 lines
459 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package addrs
// CountAttr is the address of an attribute of the "count" object in
// the interpolation scope, like "count.index".
type CountAttr struct {
referenceable
Name string
}
func (ca CountAttr) String() string {
return "count." + ca.Name
}
func (ca CountAttr) UniqueKey() UniqueKey {
return ca // A CountAttr is its own UniqueKey
}
func (ca CountAttr) uniqueKeySigil() {}