GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Go to GitLab Docs homepage
  • What's new?
  • Get free trial
  • Use GitLab
  • GitLab Duo
  • GitLab Orbit
  • Extend
  • Install
  • Administer
  • Subscribe
  • Contribute
  • Solutions
  • Getting started
  • Tutorials

This view

  • Original page
  • New address

GeezerVison is showing docs.gitlab.com — Google Cloud integration API | GitLab Docs

 / 

Google Cloud integration API

  • Tier: Free, Premium, Ultimate
  • Offering: GitLab.com
  • Status: Experiment

Use this API to interact with the Google Cloud integration. For more information, see GitLab and Google Cloud integration.

Project-level Google Cloud integration scripts

  • Status: Experiment

Workload identity federation creation script

Users with the Maintainer or Owner role for the project can use the following endpoint to query a shell script that creates and configures the workload identity federation in Google Cloud:

GET /projects/:id/google_cloud/setup/wlif.sh

Supported attributes:

AttributeTypeRequiredDescription
idintegerYesThe ID of a project.
google_cloud_project_idstringYesGoogle Cloud Project ID for the workload identity federation.
google_cloud_workload_identity_pool_idstringNoID of the Google Cloud workload identity pool to create. Defaults to gitlab-wlif.
google_cloud_workload_identity_pool_display_namestringNoDisplay name of the Google Cloud workload identity pool to create. Defaults to WLIF for GitLab integration.
google_cloud_workload_identity_pool_provider_idstringNoID of the Google Cloud workload identity pool provider to create. Defaults to gitlab-wlif-oidc-provider.
google_cloud_workload_identity_pool_provider_display_namestringNoDisplay name of the Google Cloud workload identity pool provider to create. Defaults to GitLab OIDC provider.

Example request:

shell
curl --request GET \
     --header "PRIVATE-TOKEN: <your_access_token>" \
     --url "https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/wlif.sh"

Script to set up a Google Cloud integration

Users with the Maintainer or Owner role for the project can use the following endpoint to query a shell script to set up a Google Cloud integration:

GET /projects/:id/google_cloud/setup/integrations.sh

Only the Google Artifact Management integration is supported. The script creates IAM policies to access Google Artifact Registry:

  • Artifact Registry Reader role is granted to members with at least Reporter role
  • Artifact Registry Writer role is granted to members with at least Developer role

Supported attributes:

AttributeTypeRequiredDescription
idintegerYesThe ID of a GitLab project.
enable_google_cloud_artifact_registrybooleanYesFlag to indicate if Google Artifact Management integration should be enabled.
google_cloud_artifact_registry_project_idstringYesGoogle Cloud Project ID for the Artifact Registry.

Example request:

shell
curl --request GET \
     --header "PRIVATE-TOKEN: <your_access_token>" \
     --url "https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/integrations.sh"

Script to configure a Google Cloud project for runner provisioning

Users with the Maintainer or Owner role for the project can use the following endpoint to query a shell script to configure a Google Cloud project for runner provisioning and execution:

GET /projects/:id/google_cloud/setup/runner_deployment_project.sh

The script performs preparatory configuration steps in the specified Google Cloud project, namely enabling required services and creating a GRITProvisioner role and a grit-provisioner service account.

Supported attributes:

AttributeTypeRequiredDescription
idintegerYesThe ID of a GitLab project.
google_cloud_project_idstringYesThe ID of the Google Cloud project.

Example request:

shell
curl --request GET \
     --header "PRIVATE-TOKEN: <your_access_token>" \
     --url "https://gitlab.com/api/v4/projects/<your_project_id>/google_cloud/setup/runner_deployment_project.sh?google_cloud_project_id=<your_google_cloud_project_id>"
Was this page helpful?
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.