Difference between revisions of "Terraform function: tolist"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
* <code>tolist</code> | * <code>tolist</code> | ||
+ | |||
+ | resource "aws_identitystore_user" "example" { | ||
+ | [[identity_store_id]] = [[tolist]](data.aws_ssoadmin_instances.example.identity_store_ids)[0] | ||
+ | |||
+ | display_name = "John Doe" | ||
+ | user_name = "johndoe" | ||
+ | |||
+ | name { | ||
+ | given_name = "John" | ||
+ | family_name = "Doe" | ||
+ | } | ||
+ | |||
+ | emails { | ||
+ | value = "[email protected]" | ||
+ | } | ||
+ | } | ||
== Related terms == | == Related terms == |
Revision as of 10:43, 27 February 2023
tolist
resource "aws_identitystore_user" "example" { identity_store_id = tolist(data.aws_ssoadmin_instances.example.identity_store_ids)[0] display_name = "John Doe" user_name = "johndoe" name { given_name = "John" family_name = "Doe" } emails { value = "[email protected]" } }
Related terms
- Splat expression
- Error: Error in function call: "
list
" function was deprecated in Terraform v0.12 toset
- Terraform variable types
See also
- Terraform functions, Terraform collection functions:
tolist
,toset
,length
,sum
,file
,join
,depends_on
,zipmap
,replace
,lookup
,read files
,concat
,merge, templatefile, for_each, format, element, slice, try, filebase64, upper, filemd5, coalesce, formatlist, flatten
- 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: