Terraform
Parameters
Parameters in function definitions describes how data values are passed to the function logic. Every parameter type has an associated value type, although this data handling is simplified for function implementations over other provider concepts, such as resource implementations.
Available Parameter Types
Function definitions support the following parameter types:
- Primitive: Parameter that accepts a single value, such as a boolean, number, or string.
- Collection: Parameter that accepts multiple values of a single element type, such as a list, map, or set.
- Object: Parameter that accepts a structure of explicit attribute names.
Primitive Parameter Types
Parameter types that accepts a single data value, such as a boolean, number, or string.
Parameter Type | Use Case |
---|---|
Bool | Boolean true or false |
Float64 | 64-bit floating point number |
Int64 | 64-bit integer number |
Number | Arbitrary precision (generally over 64-bit, up to 512-bit) number |
String | Collection of UTF-8 encoded characters |
Collection Parameter Types
Parameter types that accepts multiple values of a single element type, such as a list, map, or set.
Parameter Type | Use Case |
---|---|
List | Ordered collection of single element type |
Map | Mapping of arbitrary string keys to values of single element type |
Set | Unordered, unique collection of single element type |
Object Parameter Type
Parameter type that accepts a structure of explicit attribute names.
Parameter Type | Use Case |
---|---|
Object | Single structure mapping explicit attribute names |