When you create an AKS cluster you must have a default node pool, then you can add as many additional node pools as you like. You cannot use Spot instances for the default node pool, however you can use them for your additional node pools. So if you want to do this you would create a small default pool to run system pods etc, and then create another node pool for your workloads using spot nodes.
In Terraform you can do this with the "priority" property of the node pool.