In Google Cloud, a project is the base container for resources and billing, and it must exist before any API can be enabled on it or any resource (such as a Compute Engine instance) can be created within it. The correct approach is to use the gcloud CLI to first create the new project, then enable the Compute Engine API for that project, and finally create the instance while specifying the newly created project. This matches the required order of operations documented in Google Cloud's project creation and API enablement guidance — you cannot enable an API or create a resource in a project that does not yet exist, and there is no built-in 'create instance in a new project' shortcut within the instance creation UI.
Community Discussion