Last active
April 27, 2022 10:33
-
-
Save rcarrata/a9ccd3b072022afe9e0c1f1d3f2f335a to your computer and use it in GitHub Desktop.
Enable APIs in GCP for OpenShift Dedicated installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enable APIs OSD in GCP | |
# based in https://docs.openshift.com/dedicated/osd_planning/gcp-ccs.html#ccs-gcp-customer-procedure_gcp-ccs | |
# Set your GCP project | |
PROJECT_ID="mygcp-project" | |
echo "# Setting your $PROJECT_ID GCP project" | |
gcloud config set project $PROJECT_ID | |
# Enable required APIs in GCP | |
apis=("deploymentmanager.googleapis.com" "compute.googleapis.com" "cloudapis.googleapis.com" \ | |
"cloudresourcemanager.googleapis.com" "dns.googleapis.com" "networksecurity.googleapis.com" \ | |
"iamcredentials.googleapis.com" "iam.googleapis.com" "servicemanagement.googleapis.com" "storage-api.googleapis.com" "storage-component.googleapis.com" "serviceusage.googleapis.com") | |
for api in "${apis[@]}"; do echo "# Enabling -> $api"; gcloud services enable "$api"; done | |
echo "## All GCP APIs are enabled properly!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Script Output -