Different Google Cloud Platform resources written with Terraform.
- 1001 VPC
- 1002 Compute Engine
- 1003 VPC subnetting
- 1004 VM on Specific Subnet and FireWall
- 1005 Deploy Container on Comp. Engine
- [Cloud Storage]
- create bucket
- upload objects to the bucket
- 1004 Cloud Functions
- 1005 Cloud Run
- 1006 Google Cloud CDN
- serve bucket contents
- serve static website
- set the current project -
gcloud auth list
gcloud config get-value project
gcloud config set project utility-cathode-451011-t4 # project id
- Create a service acc [ convention: sa-{short_project_name}-tf-{Environment} ]
gcloud iam service-accounts create sa-mfp-tf-dev --project utility-cathode-451011-t4 --display-name "Terraform dev acc"
- Assign role (permission) -
gcloud projects add-iam-policy-binding utility-cathode-451011-t4 --member="serviceAccount:sa-mfp-tf-dev@utility-cathode-451011-t4.iam.gserviceaccount.com" --role="roles/editor"
- Download the key -
gcloud iam service-accounts keys create ~/.config/gcloud/utility-cathode-451011-t4.json --iam-account=sa-mfp-tf-dev@utility-cathode-451011-t4.iam.gserviceaccount.com