Skip to content

Instantly share code, notes, and snippets.

@drewgillson
Last active April 18, 2020 16:57
Show Gist options
  • Save drewgillson/78354bbf05cacebac9ef08c59458707f to your computer and use it in GitHub Desktop.
Save drewgillson/78354bbf05cacebac9ef08c59458707f to your computer and use it in GitHub Desktop.

Terraform for Looker cluster on GCP

  1. Create a working directory that contains the provided setup-gcp-infrastructure-for-looker.tf and setup-looker.sh files and navigate to it in a terminal.

  2. Accept the Looker EULA for your license key so you can download the JAR programmatically. You only need to accept the agreement, you do not need to download the files.

  3. Download an appropriate terraform binary and ensure terraform is in your $PATH

  4. Install gcloud then login from the command line by typing gcloud auth application-default login and follow these instructions to create an admin project that can provision additional projects. You will also need to add two more IAM bindings:

    gcloud organizations add-iam-policy-binding ${TF_VAR_org_id} \
    --member serviceAccount:terraform@${TF_ADMIN}.iam.gserviceaccount.com \
    --role roles/compute.networkUser
    
    gcloud organizations add-iam-policy-binding ${TF_VAR_org_id} \
    --member user:[email protected] \
    --role roles/compute.instanceAdmin.v1
    
  5. Set values for your SSH username, billing account ID, and organization ID in the setup-gcp-infrastructure-for-looker.tf file

  6. Type terraform init to install dependencies

  7. Type terraform apply and wait 10-15 minutes

  8. Browse to the Looker welcome screen by visiting the Load Balanced Host displayed at the bottom of the output. You will need to accept the unsafe self-signed certificate to access Looker.

  9. Replace the self-signed certificate with SSL certificate of your choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment