A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.hashicorp.com/terraform/plugin/framework/handling-data/types/tuple below:

Tuple types | Terraform | HashiCorp Developer

Note

The tuple type doesn't have associated schema attributes as it has limited real world application. Provider developers will only encounter tuples when handling provider-defined function variadic parameters or dynamic values.

Tuple types store an ordered collection of elements where each element has it's own type. Values must have exactly the same number of elements (no more and no fewer), and the value in each position must match the specified type for that position.

The tuple type is used to express Terraform's tuple type constraint.

The tuple type is not supported in schema definitions of provider, data sources, ephemeral resources, or managed resources as it has limited real world application.

Access types.Tuple information via the following methods:

Call one of the following to create a types.Tuple value:

In this example, a known tuple value (["one", true, 123]) is created from framework types:

elementTypes := []attr.Type{
    types.StringType,
    types.BoolType,
    types.Int64Type,
}
elements := []attr.Value{
    types.StringValue("one"),
    types.BoolValue(true),
    types.Int64Value(123),
}

tupleValue, diags := types.TupleValue(elementTypes, elements)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4