That's OK ... you apply for the ITIN with the return ...
To get an ITIN (Individual Tax Identification Number) you will need to fill out form W7 and attach it to the front of your tax return. You will also need to submit additional documentation to prove your identity and status. A passport is the only stand alone document, otherwise you need to submit two documents (see instructions). You can submit original documents; however, it is safer to submit copies. These copies need to be certified by the issuing agency.
Send your return, form W7 and the supporting documents to the address in the instructions (see link below).
You can also apply in person at an IRS office handling ITIN applications (see link ITIN Acceptance Agents).
Turbotax does not support form W7, but you can download it and fill it out manually (or using a pdf editor).
Write "applied for, see attached W7" in the box for the SSN/ITIN on your tax return.
You need to write that in after printing out your return.
Instructions for Form W7:
ITIN Acceptance Agents (US and international)
To apply for an ITIN from abroad:
Additional publications of interest:
Per the answer from bine22 :
Filing jointly might be beneficial, but it definitely not always is.
You have three options to file:
1. Married filing separately (or HoH if you have a qualifying child). You would have to print your return and write NRA in the box for your spouses SSN/ITIN and file on paper.
2. Married filing separately (or HoH if you have a qualifying child) and claiming an exemption for your spouse if they had no US source income. In this case you would need to apply for an ITIN together with your tax return.
3. Married filing jointly. You would need to add a statement that you both choose to treat your spouse as resident alien and apply for an ITIN. However, in this case your spouse would have to report worldwide income as well, but would be able to use the FEIE and/or foreign tax credit.
You need to carefully
evaluate your options and choose the best for you and your spouse. They might
not want to expose their income to the IRS, even f it's more beneficial.
If you yourself are eligible to use the Foreign Earned income exclusion and you income is less than the maximum exclusion and you don't have any other or very little taxable income, filing separately is probably the best option.
Have a look at publication 54: https://www.irs.gov/pub/irs-pdf/p54.pdf