Enabling the Cloud Build API

0 votes
I want to import a virtual appliance to GCP for which I need to enable the Cloud build API. How do I enable it?
Oct 21 in GCP by Sam
• 3,920 points
18 views

1 answer to this question.

0 votes

The virtual appliance import tool uses Cloud Build. Enable the Cloud Build service in your project, and grant the Cloud Build service account permissions to create and manage compute resources.

To set up the Cloud Build service using gcloud command-line tool, complete the following steps:

  1. Enable Cloud Build.

    gcloud services enable cloudbuild.googleapis.com

    The import tool also uses the default Compute Engine service account. By default, the Compute Engine service account has the Cloud IAM project editor role. If this role is removed, the import process might fail.

  2. Add the compute.admin role to the service account for the Cloud Build API.

    gcloud projects add-iam-policy-binding [PROJECT_ID] \
      --member serviceAccount:[PROJECT_NUM]@cloudbuild.gserviceaccount.com \
      --role roles/compute.admin
  3. Add the iam.serviceAccountUser role to the service account for the Cloud Build API.

    gcloud projects add-iam-policy-binding [PROJECT_ID] \
      --member serviceAccount:[PROJECT_NUM]@cloudbuild.gserviceaccount.com \
      --role roles/iam.serviceAccountUser
  4. Add the iam.serviceAccountTokenCreator role to the service account for the Cloud Build API.

    gcloud projects add-iam-policy-binding [PROJECT_ID] \
      --member serviceAccount:[PROJECT_NUM]@cloudbuild.gserviceaccount.com \
      --role roles/iam.serviceAccountTokenCreator

    where:

    • [PROJECT_ID] is your projectID.

    • [PROJECT_NUM] is your project number.

answered Oct 21 by Sirajul
• 37,930 points
How do I import a OVA file in GCP?

Related Questions In GCP

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How does the pricing model work in GCP cloud?

While working with Google Cloud Platform, the ...READ MORE

answered Oct 7 in GCP by Sirajul
• 37,930 points
24 views
0 votes
1 answer
0 votes
1 answer

AWS to GCP migration.

Migrate for Compute Engine gets enterprise applications ...READ MORE

answered Oct 21 in GCP by Sirajul
• 37,930 points
62 views
0 votes
1 answer
0 votes
1 answer

where is drop down menu for the google cloud platform

It is important that you are signed ...READ MORE

answered Sep 20 in GCP by Sirajul
• 37,930 points
60 views