I’m at a loss to figure out why this is no longer working - even on destroy of everything, I’m still getting this on an attempt to recreate the Fargate Cluster:
module.fargate_service.aws_ecs_service.fargate_without_lb: Resource 'aws_ecs_task_definition.task' not found for variable 'aws_ecs_task_definition.task.arn'
It’s the same as other infra we have and I’m not sure what happened to cause this to error out. Looking for any pointers if anyone has seen anything similar. It’s like it can’t find a task.arn, but how would it know this before it’s deployed?
It looks like this was from some sort of remote-state (s3) namespace corruption - I simply renamed the folder for this and it worked fine. I wonder if this is from manual updating of the service task count in the console or something. I also had already done a tg destroy and all was successful, but there could have been some orphaned infra.
Anyway, resolved, but did not determine root cause.