Terraform 入門
Terraform を使って GCP 上のインスタンスを作成する
Cloud SQL with Postgres
基本的にこのページの真似をする
秘匿情報はとりあえず terraform.tfstate に入れて gitignore
Service account が必要
role は Cloud SQL Admin
VPC
vpc 構築する
公式チュートリアル
memo
GCP で terraform 使う
構成の参考に
Trouble shooting
code:text
* google_compute_instance.ubuntu-xenial: The user does not have access to service account '298693621029-compute@developer.gserviceaccount.com'. User: 'terraform@system-automation-184009.iam.gserviceaccount.com'. Ask a project owner to grant you the iam.serviceAccountActor role on the service account
default のサービスアカウントとのリンク