Skip to content

Latest commit

 

History

History
78 lines (47 loc) · 3.52 KB

PREREQUISITES.md

File metadata and controls

78 lines (47 loc) · 3.52 KB

google-actions » prerequisites

Increase Google Cloud Quotas

There are a few Google Cloud default quotas that may need to be adjusted.

  1. VM instances
  2. Networks

Choose the region and set the limit to >= 30 in your request.

Note: The above quotas will be enough to deploy the infrastructure needed for installing TAP. Individual mileage may vary depending on existing resources.

Setup an Google Cloud service principal

First, authenticate to Google Cloud.

Do this only if you are planning on running Terraform scripts locally with an IAM user

gcloud auth login

Or set the necessary environment variables.

export GOOGLE_APPLICATION_CREDENTIALS=<path_to_your_principal_account_key>

Then visit the following Terraform module found here and follow the instructions in the README

This will create the service account (with appropriate roles) that will be used by all other Terraform modules.

Enable the Secret Manager API

Follow these instructions.

(Optional) Setup a Github SSH key-pair

You will need to create a new public/private SSH key-pair in order to work with (i.e., pull from/push to) private git repositories (e.g., Github, Gitlab, Azure Devops).

Here's how to set up such a key-pair for named repo providers:

Also see Git Authentication.

Setup a Personal Access Token in Github

A PAT is required so that workflows can add secrets to the repository in order to be used in downstream jobs. Documentation can be found here.

We are using this personal access token to create secrets for the google backend for Terraform

Configure Github Secrets

Setup some Github secrets with the SP credentials. Documentation can be found here. You might also consider using gh secret set command to set these individually. Or, after exporting all environment variables below, execute gh-secrets-setup.sh at the command-line passing google as an execution argument.

# The Google Cloud project that will host all resources created
export GOOGLE_PROJECT_ID=
# The base64-encoded contents of the Google Cloud project's service account key that has the authority to create cloud resources
export GOOGLE_SERVICE_ACCOUNT_KEY=

You'll also want to create another secret whose value is the fine-grained personal token you created in the prior step.

export PA_TOKEN=