That's where formalities and reality collide.
Formally, Turkey is still in NATO and is its ally.
In reality, Turkey is going its own way and playing Russia and the rest of NATO against each other, picking the most convenient offer at the moment.
The S-400 choice was a long term commitment that...