https://github.com/overleaf/infra_manager_demo
Demo repo for Google Infrastructure Manager
https://github.com/overleaf/infra_manager_demo
Last synced: 3 months ago
JSON representation
Demo repo for Google Infrastructure Manager
- Host: GitHub
- URL: https://github.com/overleaf/infra_manager_demo
- Owner: overleaf
- Created: 2023-09-17T16:33:47.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-02T09:55:22.000Z (almost 2 years ago)
- Last Synced: 2025-12-31T21:43:39.183Z (6 months ago)
- Language: HCL
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Infrastructure Manager
Demo Terraform config for Google's new [Infrastructure Manager](https://cloud.google.com/infrastructure-manager/docs).
This repo needs to be public, as it appears Infrastructure Manager doesn't currently support auth to private GitHub repos.
```
export PROJECT_ID=...
export ACCOUNT_ID=...
export FOLDER_ID=...
gcloud projects create $PROJECT_ID --folder=$FOLDER_ID
gcloud billing projects link $PROJECT_ID --billing-account=$ACCOUNT_ID
gcloud --project $PROJECT_ID services enable config.googleapis.com
gcloud --project $PROJECT_ID iam service-accounts create sva-infra-manager
gcloud projects add-iam-policy-binding $PROJECT_ID --member="serviceAccount:sva-infra-manager@$PROJECT_ID.iam.gserviceaccount.com" --role=roles/config.agent
gcloud projects add-iam-policy-binding $PROJECT_ID --member="serviceAccount:sva-infra-manager@$PROJECT_ID.iam.gserviceaccount.com" --role=roles/owner
gcloud alpha --project $PROJECT_ID infra-manager deployments apply gce-instance --git-source-repo=https://github.com/overleaf/infra_manager_demo.git --git-source-directory=gce_instance --location=us-central1 --service-account=projects/$PROJECT_ID/serviceAccounts/sva-infra-manager@$PROJECT_ID.iam.gserviceaccount.com --input-values=project_id=$PROJECT_ID
gcloud alpha --project $PROJECT_ID infra-manager deployments delete gce-instance --location=us-central1
```