Error: Unexpected resource instance key

From wikieduonline
Revision as of 02:33, 21 March 2023 by Brave (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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: