Difference between revisions of "Error: Unexpected resource instance key"

From wikieduonline
Jump to navigation Jump to search
 
Line 9: Line 9:
 
  │
 
  │
 
  │ Because aws_ecs_task_definition.your_task does not have "[[count]]" or
 
  │ Because aws_ecs_task_definition.your_task does not have "[[count]]" or
  │ "[[for_each]]]" set, references to it must not include an index key. Remove the
+
  │ "[[for_each]]" set, references to it must not include an index key. Remove the
 
  │ [[bracketed]] index to refer to the single instance of this resource.
 
  │ [[bracketed]] index to refer to the single instance of this resource.
  

Latest revision as of 02:33, 21 March 2023

Error: Unexpected resource instance key


╷
│ Error: Unexpected resource instance key
│
│   on nats.tf line 5, in resource "aws_ecs_service" "your_service":
│    5:   task_definition = "${aws_ecs_task_definition.your_task[0].family}:${aws_ecs_task_definition.your_task[0].revision}"
│
│ Because aws_ecs_task_definition.your_task does not have "count" or
│ "for_each" set, references to it must not include an index key. Remove the
│ bracketed index to refer to the single instance of this resource.



Advertising: