Skip to content

gcloud setup project

devonfw-core edited this page Dec 27, 2022 · 3 revisions

Setup Google Cloud project

By the end of this guide a new project in Google Cloud will be created, with Billing and relevant APIs enabled.

Prerequisites

  1. Install the Google Cloud CLI.

  2. Have a billing account. If not, create a new billing account.

Creating the Google Cloud project

There are two ways of creating a Google Cloud project:

  1. Manually using the web interface:

    1. Create a project following official guide.

    2. Enable billing for the project following official guide

    3. Enable Cloud Source Repositories, Cloud Run Admin, and Artifact Registry APIs following official guide

  2. In an automated way using the provided script, as shown below.

Creating Google Cloud project using provided script

The script located at scripts/accounts/gcloud/create-project.sh enables you to create and configure a new Google Cloud project.

Usage

create-project.sh \
  -n <name> \
  -b <billing account> \
  [-d <description>] \
  [-f <folder>] \
  [-o <organization>]
  [--firebase]
  

Flags

-n    [Required] Name of the new project. (6-30 chars, lowercase letters, numbers, and hyphens)
-b    [Required] Billing account. If not specified, won't be able to enable some services.
-d               Description for the new project.
-f               Numeric ID of the folder for which the project will be configured.
-o               Numeric ID of the organization for which the project will be configured.
--firebase       Creates the project as a Firebase project.

Example

./create-project.sh -n "project-test-123" -b XXXXXX-XXXXXX-XXXXXX -d "This is a sample application"

Guides per provider

Clone this wiki locally