Terraform: 400 badRequest on google_iam_policy

Created on 10 Dec 2016  ยท  3Comments  ยท  Source: hashicorp/terraform

Have tried several incarnations of google_iam_policy but always get:

Error applying IAM policy for project "foo": googleapi: Error 400: Request contains an invalid argument., badRequest

when attempting to apply. v0.7.13.

Sample data:

        "google_iam_policy": {
            "ebay_iam": {
                "binding": [
                    {
                        "role": "roles/owner",
                        "members": ["user:[email protected]"],
                    }
                ]
            }
        }
bug providegoogle-cloud

Most helpful comment

This happens when trying to set a user to an owner, which is an invalid operation (Owners can only be manually added via the web console). See this doc on constraints when setting IAM policies. Better error messaging, and perhaps a link to this doc from Terraform's docs would be helpful.

All 3 comments

This happens when trying to set a user to an owner, which is an invalid operation (Owners can only be manually added via the web console). See this doc on constraints when setting IAM policies. Better error messaging, and perhaps a link to this doc from Terraform's docs would be helpful.

Closed via #11188

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings