mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-23 23:50:12 -06:00
bc31dbc179
This is part of a general effort to move all of Terraform's non-library package surface under internal in order to reinforce that these are for internal use within Terraform only. If you were previously importing packages under this prefix into an external codebase, you could pin to an earlier release tag as an interim solution until you've make a plan to achieve the same functionality some other way.
29 lines
927 B
Go
29 lines
927 B
Go
package instances
|
|
|
|
import (
|
|
"github.com/zclconf/go-cty/cty"
|
|
)
|
|
|
|
// RepetitionData represents the values available to identify individual
|
|
// repetitions of a particular object.
|
|
//
|
|
// This corresponds to the each.key, each.value, and count.index symbols in
|
|
// the configuration language.
|
|
type RepetitionData struct {
|
|
// CountIndex is the value for count.index, or cty.NilVal if evaluating
|
|
// in a context where the "count" argument is not active.
|
|
//
|
|
// For correct operation, this should always be of type cty.Number if not
|
|
// nil.
|
|
CountIndex cty.Value
|
|
|
|
// EachKey and EachValue are the values for each.key and each.value
|
|
// respectively, or cty.NilVal if evaluating in a context where the
|
|
// "for_each" argument is not active. These must either both be set
|
|
// or neither set.
|
|
//
|
|
// For correct operation, EachKey must always be either of type cty.String
|
|
// or cty.Number if not nil.
|
|
EachKey, EachValue cty.Value
|
|
}
|