How to Create GCP Service Account Keys

How to Create GCP Service Account Keys

GCP Service Account Keys
Service Account Keys allows snapblocs to access customers' Google cloud provider environment for deploying customer stacks, collecting statistics of the stacks, etc. 
Service Account Keys are encrypted and stored on the secured AWS Systems Manager Parameter Store (not on the snapblocs system) to protect the customer's access keys from any unauthorized access.
You can create service account keys either
  1. following Creating service account keys or running the provided createServiceAccountKey.sh script.
To run createServiceAccountKey.sh:
  1. Download the attached createServiceAccountKey.sh script to your local file system for creating GCP Service Account Keys.
The script will:
  1. Creating a service account
  2. Create a privateKeyData
  3. Enabling the following APIs 
    1. Google Kubernetes Engine API
    2. Compute Engine API
    3. Cloud Key Management Service (KMS) API
    4. Cloud Resource Manager API
  4. Save the privateKeyData into JSON file (base64-encoded string in JSON)
Prerequisites
To run the script
  • Initialize Google Cloud SDK if you haven’t already.
  • Run the createServiceAccountKey.sh script.
    • chmod +x createServiceAccount.sh
    • bash createServiceAccountKey.sh
  • Follow the on-screen instructions.
What's Next?