Is it possible to use a Google Voice Number for Apple Two Factor Authentication I keep getting prompts to 'upgrade' my account security to use 2 factor authentication.
The reason I am hesitating using my real phone number for unlocking my devices is because I don't want to be in a situation when I am traveling internationally and am unable to unlock my computer.
So far it seems I have only a few options :

Get another Apple device, like an iPhone SE or the base model iPad, for the sole purpose of unlocking my account and take it with me everywhere I go internationally.

Use a Google voice number which I could associate with a local number while travelling, to help me receive a 'roaming SMS'.


If I can figure out a reasonable solution to this, I may consider changing the security settings.
I wish Apple would just provide an app based authenticator like Google and Microsoft.
EDIT:
It seems from the answers and comments that computer accounts and iCloud (online) accounts are kept separate despite the push for 2 factor authentication.
This is really encouraging, but I will do some more research on the changes before switching.
Unlocking your computer when using 2-factor authentication for iCloud does not require being able to receive a text message at all.
When you enable 2-factor authentication for the very first time, you'll be asked to enter a phone number where you receive a confirmation code via either text or voice (your choice).
Now in the future when you want to login to for example www.icloud.com, the 2-factor code will popup on your computer automatically. It will not require receiving a text message or voice call.
This works using a similar technique as app based authenticators like the Google Authenticator app and the Microsoft Authenticator app, namely that a secret is stored on your device and that enables you to generate 2-factor codes on this particular device. It does not however follow the TOTP standard like those two authenticator apps.
Only when that secret is lost (for example by wiping your hard drive), and you haven't got access to any other device that can generate the 2-factor code for you - you'll need to request a new confirmation code by text or voice.
If you want to guard against that (rare) situation, you can definitely use a Google Voice number to receive the voice delivered code.