2024-02-08 03:48:59 -06:00
|
|
|
// Copyright (c) The OpenTofu Authors
|
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
// Copyright (c) 2023 HashiCorp, Inc.
|
2023-05-02 10:33:06 -05:00
|
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
|
2018-03-30 21:58:57 -05:00
|
|
|
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
|
|
|
|
}
|
2018-04-03 20:03:47 -05:00
|
|
|
|
|
|
|
func (ca CountAttr) String() string {
|
|
|
|
return "count." + ca.Name
|
|
|
|
}
|
2021-07-10 17:18:19 -05:00
|
|
|
|
|
|
|
func (ca CountAttr) UniqueKey() UniqueKey {
|
|
|
|
return ca // A CountAttr is its own UniqueKey
|
|
|
|
}
|
|
|
|
|
|
|
|
func (ca CountAttr) uniqueKeySigil() {}
|