Get experience configuring a cloud environment
- You'll be pairing with your Lab partner.
- You'll be making setting things up using Terraform (console), checking them in the Console (pointing and clicking).
- There are a lot of things that can go wrong. No stress, this is a learning experience.
- Take your time. It's preferred that you read outputs carefully, understand what's going on, and explore, rather than rushing through.
Work through the Terraform Google Cloud tutorial, pairing in your Lab groups.
- When it asks you to create a Google Cloud Project, do so with the following settings:
- Project name: Something like
<user1>-<user2>-lab-12 - Organization:
afeld.me - Location:
SIPA Advanced Computing->Spring 2026
- Project name: Something like
We're going to deploy a Cloud Run Function that lists our BigQuery datasets. You can do this part through the Console.
- Switch to the Project created above.
- Create a table in BigQuery using sample data from Lab 8 or any other CSV.
- Create a Function using the "inline editor". Set the following, leave the other defaults.
- Service name:
lab-12 - Region:
us-central1 - Runtime:
Python 3.14 - Uncheck
Use Cloud IAM to authenticate incoming requests. - Under
Container(s), Volumes, Networking, Security->Security, set service account to beDefault compute service account.
- Service name:
- It will give you some
Hello Worldcode. ClickSave and redeploy. - Deployment might take a few minutes. When it's done, try visiting the
URL. - View the Logs.
- Refresh the live
URLa bunch of times. - View the Metrics.
- Explain to each other what happened in this section.
Edit source, and replace the code.main.py- Function entry point:
list_datasets requirements.txt
- Click
Save and redeploy. - Deployment might take a minute. When it's done, try visiting the
URL. It should show an empty list ([]), as it doesn't have access to any BigQuery DataSets. - Grant BigQuery Data Viewer to the default compute service account (
<project-id>-compute@developer.gserviceaccount.com). - Refresh the Function URL. You should see your dataset listed.
- Explain to each other what happened in this section.
Unlike when we set up Streamlit to talk to BigQuery, no key was needed. Things within Google Cloud (Functions, in this case) run as a service account, and roles can be granted to that.
If you got done early, repeat the steps above using the Google Cloud provider using Terraform.
Delete the Project to avoid charges.
Nothing needs to be submitted for this Lab.