Difference between revisions of "Terraform types"
Jump to navigation
Jump to search
Tags: Mobile web edit, Mobile edit |
|||
Line 3: | Line 3: | ||
− | * string: a sequence of Unicode characters representing some text, like "hello". | + | * <code>string</code>: a sequence of Unicode characters representing some text, like "hello". |
− | * number: a numeric value. The number type can represent both whole numbers like 15 and fractional values like 6.283185. | + | * <code>number</code>: a numeric value. The number type can represent both whole 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. | + | * <code>bool</code>: 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. | + | * <code>[[list]]</code> (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 {name = "Mabel", age = 52}. | + | * <code>[[map]]</code> (or object): a group of values identified by named labels, like {name = "Mabel", age = 52}. |
+ | Example: | ||
+ | type = list(string) | ||
+ | default = [] | ||
== Related terms == | == Related terms == |
Revision as of 10:02, 7 September 2021
string
: a sequence of Unicode characters representing some text, like "hello".number
: a numeric value. The number type can represent both whole 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 {name = "Mabel", age = 52}.
Example:
type = list(string) default = []
Related terms
See also
- Terraform, OpenTofu, Terrakube.org, Installation, Terraform AWS, Terraform GCP, Terraform commands, Terraform Cloud, Terraform Enterprise (TFE), HCL, HIL, meta-arguments, providers, modules, resource, provisioners, data sources, backends: remote backends, examples, configuration files, state files, variables, types, Terraform Registry, conditionals:
depends_on
, functions, Blocks, dynamic blocks, errors, Terragrunt, Terraformer, Terratest, Terraform certifications, Terraform map type, Terraform Associate, Terraform: list type,TF_VAR_, TF_LOG
, Terraform provider versioning, Terraform Style Conventions, Required version, Terraform plugin, Terraform Named Values, tags, Changelog,tfsec, tflint
, Operators, Expressions:for, splat
, Debugging, Namespaces, Terraform Landing Zones, CDKTF, Atmos
Advertising: