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, 2019 in GCP by Sam
• 6,260 points
3,776 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.

Hope it helps!!

If you need to know more about Google Cloud, We recommend joining GCP Certification course today.

Thanks!

answered Oct 21, 2019 by Sirajul
• 59,230 points
How do I import a OVA file in GCP?

Related Questions In GCP

0 votes
0 answers

Understanding "action required" email from GCP, re: enable Cloud Build API

I use Firebase for my web apps, ...READ MORE

Apr 7, 2022 in GCP by Rahul
• 3,380 points
616 views
0 votes
1 answer
0 votes
1 answer

What are the libraries and tools for cloud storage on GCP?

At the center level, XML API and ...READ MORE

answered Oct 7, 2019 in GCP by Sirajul
• 59,230 points
1,955 views
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, 2019 in GCP by Sirajul
• 59,230 points
2,873 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, 2019 in GCP by Sirajul
• 59,230 points
2,639 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, 2019 in GCP by Sirajul
• 59,230 points
1,714 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP