Skip to content

MobilityData/gtfs-infrastructure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GTFS Infrastructure

Quick Start

terraform

Relevant paths include:

  • domain/gtfs-infrastructure.tfvars: manage infrastructure configuration (definitions)
  • terraform/*: manage infrastructure implementation

To test changes:

make -C pipelines/iac ci

To apply changes:

make -C pipelines/iac cd

Re-init terraform (required when, e.g., new or renamed module, new provider, etc):

rm -r terraform/.terraform
make -C pipelines/iac ci

One-Time Setup

These steps must be performed once at creation time of the project

terraform

  1. Create a bucket for terraform state
gcloud storage buckets create gs://gtfs-infrastructure-tfstate

github actions

  1. Create a service account
gcloud iam service-accounts create github-actions \
  --display-name="GitHub Actions Runner"
  1. Grant the account privileges to manage the project
gcloud projects add-iam-policy-binding web-based-gtfs-validator \
  --member=serviceAccount:[email protected] \
  --role=roles/owner
  1. Provision a key for the service account
gcloud iam service-accounts keys create .git/github-actions-sa.json \
  --iam-account=github-actions@web-based-gtfs-validator.iam.gserviceaccount.com
  1. Upload the key to a GitHub Actions secret
gh -R MobilityData/gtfs-infrastructure secret set GCP_SA_KEY < .git/github-actions-sa.json

About

Repo for MobilityData's infrastructure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published