def adjust_fargate_options(options)
      task_def = recent_task_definition
      return options unless task_def[:network_mode] == "awsvpc"

      awsvpc_conf = { subnets: network[:ecs_subnets] }
      if task_def[:requires_compatibilities] == ["FARGATE"]
        awsvpc_conf[:assign_public_ip] = "ENABLED"
        options[:launch_type] = "FARGATE"
      end

      options[:network_configuration] = { awsvpc_configuration: awsvpc_conf }
      options
    end
def adjust_fargate_options(options)
      task_def = recent_task_definition
      return options unless task_def[:network_mode] == "awsvpc"

      awsvpc_conf = { subnets: network[:ecs_subnets] }
      if task_def[:requires_compatibilities] == ["FARGATE"]
        awsvpc_conf[:assign_public_ip] = "ENABLED"
        options[:launch_type] = "FARGATE"
      end

      options[:network_configuration] = { awsvpc_configuration: awsvpc_conf }
      options
    end
adjust network_configuration based on fargate and network mode of awsvpc