概要
いつからのタイミングかTerraformでGCPのリソース管理している環境で以下エラーが出るようになってしまいました。
Error: module : provider alias must be defined by the module: google-beta
対応
以下のようにproviderの設定でgoogle-beta
の設定を追加することで解消しました。
provider "google" { project = "my-project-id" region = "asia-northeast1" }
↓
provider "google" { project = "my-project-id" region = "asia-northeast1" } provider "google-beta" { project = "my-project-id" region = "asia-northeast1" }
変更後、terraform init
でOKです。