- プロジェクト作成
- リポジトリの登録
https://console.cloud.google.com/cloud-build/repos
より
https://github.com/mitsuru-komaita/terraform.git
を接続する - terrafromの初期設定(cloud shellにて実行)
git clone https://github.com/mitsuru-komaita/terraform.git
cd terraform/
export GCP_PROJECT_ID=$(gcloud config get-value project)
export GCP_PROJECT_NUMBER=$(gcloud projects describe ${GCP_PROJECT_ID} |grep projectNumber: |awk '{print $2}'|sed "s/'//g")
terraform init
- GCP設定
terraform apply -var "PROJECT_ID=${GCP_PROJECT_ID}" -var "PROJECT_NUMBER=${GCP_PROJECT_NUMBER}"
- app engineのデプロイ
https://console.cloud.google.com/cloud-build/triggers
よりデプロイを実行