Costa, 28, was told by text message that boss Antonio Conte does not have him in his plans for next season.
He said: "I don't know about my future. I have a contract with Chelsea and they are the ones who know what they will do with me.
"I have to wait to see what decision my club makes."
Spain continue to lead Group G after the win in Skopje.
Manchester City midfielder David Silva opened the scoring for the fourth Spain game in a row when he finished Jordi Alba's cutback.
Costa doubled the lead when he tapped in Isco's cross.
Stefan Ristovski pulled one back for Macedonia when he drilled past David de Gea but Spain saw it out.
Spain top the group on goal difference after second-placed Italy beat Liechtenstein 5-0.
Only the group winners are guaranteed a place at next year's finals in Russia, meaning that one of the European giants are set to be in the play-offs.
Match ends, Macedonia 1, Spain 2.
Second Half ends, Macedonia 1, Spain 2.
Kire Ristevski (Macedonia) is shown the yellow card for a bad foul.
Isco (Spain) wins a free kick in the attacking half.
Foul by Kire Ristevski (Macedonia).
Substitution, Spain. Saúl Ñíguez replaces Andrés Iniesta.
Attempt blocked. Pedro (Spain) right footed shot from the centre of the box is blocked. Assisted by Diego Costa.
Attempt blocked. Sergio Ramos (Spain) header from the centre of the box is blocked. Assisted by Koke with a cross.
Corner,  Spain. Conceded by Vance Sikov.
Corner,  Spain. Conceded by Stefan Ristovski.
Attempt blocked. Sergio Ramos (Spain) right footed shot from outside the box is blocked.
Vance Sikov (Macedonia) is shown the yellow card for a bad foul.
Diego Costa (Spain) wins a free kick in the attacking half.
Foul by Vance Sikov (Macedonia).
Attempt saved. Diego Costa (Spain) right footed shot from the centre of the box is saved in the centre of the goal.
Substitution, Macedonia. Ivan Trickovski replaces Daniel Mojsov.
Attempt missed. Gerard Piqué (Spain) header from the centre of the box is close, but misses to the left. Assisted by Koke with a cross following a corner.
Corner,  Spain. Conceded by Vance Sikov.
Hand ball by Ilija Nestorovski (Macedonia).
Eljif Elmas (Macedonia) is shown the yellow card for a bad foul.
Koke (Spain) wins a free kick in the defensive half.
Foul by Eljif Elmas (Macedonia).
Attempt blocked. Ezgjan Alioski (Macedonia) left footed shot from outside the box is blocked.
Foul by Sergio Busquets (Spain).
Stefan Spirovski (Macedonia) wins a free kick in the attacking half.
Substitution, Macedonia. Aleksandar Trajkovski replaces Kristijan Tosevski.
Substitution, Spain. Koke replaces Thiago Alcántara.
Corner,  Spain. Conceded by Daniel Mojsov.
Jordi Alba (Spain) is shown the yellow card for a bad foul.
Foul by Jordi Alba (Spain).
Kristijan Tosevski (Macedonia) wins a free kick in the defensive half.
Isco (Spain) wins a free kick in the defensive half.
Foul by Daniel Mojsov (Macedonia).
Substitution, Spain. Pedro replaces David Silva.
Foul by Andrés Iniesta (Spain).
Eljif Elmas (Macedonia) wins a free kick in the defensive half.
David Silva (Spain) is shown the yellow card for a bad foul.
Foul by David Silva (Spain).
Stefan Ristovski (Macedonia) wins a free kick in the defensive half.
Goal!  Macedonia 1, Spain 2. Stefan Ristovski (Macedonia) right footed shot from the right side of the box to the top right corner. Assisted by Goran Pandev.
Diego Costa said that it is up to Chelsea to make a decision on his future after he scored in Spain's 2-1 World Cup qualifying win in Macedonia.