Difference between revisions of "Terraform: list type"

From wikieduonline
Jump to navigation Jump to search
 
(3 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
* <code>default    = []</code>
 
* <code>default    = []</code>
 
* <code>["us-west-1a", "us-west-1c"]</code>
 
* <code>["us-west-1a", "us-west-1c"]</code>
 +
 +
== Errors ==
 +
{{tuple error}}
  
 
== Related terms ==
 
== Related terms ==
Line 18: Line 21:
 
* <code>[[slice]]</code> [[terraform function]]
 
* <code>[[slice]]</code> [[terraform function]]
 
* [[Terraform object]]
 
* [[Terraform object]]
[[ The error was: list object has no element]]
+
* <code>[[ The error was: list object has no element]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 09:40, 20 April 2023

Terraform wikipedia:List (abstract data type) or tuple.

Terraform Types:

  • type = list(string)
  • default = []
  • ["us-west-1a", "us-west-1c"]

Errors[edit]

╷
│ Error: Invalid index
│
│   on api.tf line 15, in resource "aws_ecs_service" "your_service":
│   15:     target_group_arn = aws_lb_target_group.your_tg[0].arn
│     ├────────────────
│     │ aws_lb_target_group.your_tg is empty tuple
│
│ The given key does not identify an element in this collection value: the
│ collection has no elements.
╵

Related terms[edit]

See also[edit]

Advertising: