https://github.com/mobilitydata/gtfs-infrastructure
Repo for MobilityData's infrastructure
https://github.com/mobilitydata/gtfs-infrastructure
Last synced: 19 days ago
JSON representation
Repo for MobilityData's infrastructure
- Host: GitHub
- URL: https://github.com/mobilitydata/gtfs-infrastructure
- Owner: MobilityData
- Created: 2023-01-17T19:13:14.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-26T17:06:47.000Z (over 1 year ago)
- Last Synced: 2025-05-08T10:13:03.032Z (9 months ago)
- Language: HCL
- Size: 34.2 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GTFS Infrastructure
## Quick Start
### terraform
Relevant paths include:
- `domain/gtfs-infrastructure.tfvars`: manage infrastructure configuration (definitions)
- `terraform/*`: manage infrastructure implementation
To test changes:
```bash
make -C pipelines/iac ci
```
To apply changes:
```bash
make -C pipelines/iac cd
```
Re-init terraform (required when, e.g., new or renamed module, new provider, etc):
```bash
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
```bash
gcloud storage buckets create gs://gtfs-infrastructure-tfstate
```
### github actions
1. Create a service account
```bash
gcloud iam service-accounts create github-actions \
--display-name="GitHub Actions Runner"
```
2. Grant the account privileges to manage the project
```bash
gcloud projects add-iam-policy-binding web-based-gtfs-validator \
--member=serviceAccount:github-actions@web-based-gtfs-validator.iam.gserviceaccount.com \
--role=roles/owner
```
3. Provision a key for the service account
```bash
gcloud iam service-accounts keys create .git/github-actions-sa.json \
--iam-account=github-actions@web-based-gtfs-validator.iam.gserviceaccount.com
```
4. Upload the key to a GitHub Actions secret
```bash
gh -R MobilityData/gtfs-infrastructure secret set GCP_SA_KEY < .git/github-actions-sa.json
```