Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of clarify types and link to Type Constraints pagedit types into v1.5 #33789

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 9 additions & 5 deletions website/docs/language/expressions/types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,17 @@ The Terraform language uses the following types for its values:
numbers like `15` and fractional values like `6.283185`.
* `bool`: a boolean value, either `true` or `false`. `bool` values can be used in conditional
logic.
* `list` (or `tuple`): a sequence of values, like
`["us-west-1a", "us-west-1c"]`. Elements in a list or tuple are identified by
consecutive whole numbers, starting with zero.
* `map` (or `object`): a group of values identified by named labels, like
* `list`: a sequence of values, like `["us-west-1a", "us-west-1c"]`. Elements in a list are
identified by consecutive whole numbers, starting with zero.
* `set`: a collection of unique values that do not have any secondary identifiers or ordering.
* `map`: a group of values identified by named labels, like
`{name = "Mabel", age = 52}`.

Strings, numbers, and bools are sometimes called _primitive types._ Lists/tuples and maps/objects are sometimes called _complex types,_ _structural types,_ or _collection types._
Strings, numbers, and bools are sometimes called _primitive types._ Lists and sets are forms
of tuples. Maps are a form of objects. Tuples and maps are sometimes called _complex types,_
_structural types,_ or _collection types._ See
[Type Constraints](/terraform/language/expressions/type-constraints) for a more detailed
description of complex types.

Finally, there is one special value that has _no_ type:

Expand Down