LoginSignup
1
0

More than 5 years have passed since last update.

GoogleアカウントじゃないメアドをGCPのIAMに登録しようとしたらエラーになる

Posted at

GoogleアカウントじゃないメアドをGCPのIAMに登録しようとしたらエラーになる

はじめに

Terraformでgoogleアカウント以外のアカウントをIAMに登録しようとしたら、すごく分かりづらいエラーになってハマったため、メモしておく

terraformでのエラー内容

terraform plan時はエラーにならなくて、terraform apply時に以下のエラーが出る。

Error: Error applying plan:

1 error(s) occurred:

* google_project_iam_policy.projects: 1 error(s) occurred:

* google_project_iam_policy.projects: Error setting project IAM policy: Error applying IAM policy for project "project-name". \
Policy is &cloudresourcemanager.Policy{AuditConfigs:[]*cloudresourcemanager.AuditConfig(nil), \
Bindings:[]*cloudresourcemanager.Binding{(*cloudresourcemanager.Binding)(0xc00026aba0), \
 (*cloudresourcemanager.Binding)(0xc00026ac60), (*cloudresourcemanager.Binding)(0xc00026acc0),\
 (*cloudresourcemanager.Binding)(0xc00026ad20), (*cloudresourcemanager.Binding)(0xc00026ad80), \
 (*cloudresourcemanager.Binding)(0xc00026ae40), (*cloudresourcemanager.Binding)(0xc00026af00),\
 (*cloudresourcemanager.Binding)(0xc00026b140), (*cloudresourcemanager.Binding)(0xc00026b1a0),\
 (*cloudresourcemanager.Binding)(0xc00026b200), (*cloudresourcemanager.Binding)(0xc00026b2c0),\
 (*cloudresourcemanager.Binding)(0xc00026b380), (*cloudresourcemanager.Binding)(0xc00026b440),\
 (*cloudresourcemanager.Binding)(0xc00026b680), (*cloudresourcemanager.Binding)(0xc00026b6e0),\
 (*cloudresourcemanager.Binding)(0xc00026b740), (*cloudresourcemanager.Binding)(0xc00026b800),\
 (*cloudresourcemanager.Binding)(0xc00026b8c0), (*cloudresourcemanager.Binding)(0xc00026b920),\
 (*cloudresourcemanager.Binding)(0xc00026b980)}, Etag:"", Version:0,\
 ServerResponse:googleapi.ServerResponse{HTTPStatusCode:0, Header:http.Header(nil)}, \
ForceSendFields:[]string(nil), NullFields:[]string(nil)}, error is googleapi: Error 400: \
User test@example.com does not exist., badRequest

developer consoleで確認

コレ見たら一発で分かるやつやん
スクリーンショット 2019-03-22 17.01.27_moza.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0