Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

google_folder_iam_binding username capitilization issue causing change loop #3880

Closed
iamgeef opened this issue Jun 19, 2019 · 2 comments · Fixed by GoogleCloudPlatform/magic-modules#1957
Assignees
Labels

Comments

@iamgeef
Copy link

iamgeef commented Jun 19, 2019

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • If an issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to "hashibot", a community member has claimed the issue already.

Terraform Version

Terraform v0.12.2

  • provider.google v2.8.0

Affected Resource(s)

google_folder_iam_binding

Terraform Configuration Files

resource "google_folder_iam_binding" "subFolder1BQ" {
  folder  = "${google_folder.subFolder1.name}"
  role    = "roles/bigquery.dataViewer"

  members = [
    "user:myuser@gmail.com",
  ]
}

Expected Behavior

After the resource is created, subsequent actions (plan/apply) shouldn't affect this resource (unless changes made to the config file)

Actual Behavior

Google creates the user with an upper-case first character, so myuser@gmail.com is created as Myuser@gmail.com (this is also the case when manually adding the @gmail.com user via the GCP console so this part is not a Terraform creation issue).

Terraform sees this as a change from the state, so every subsequent plan is showing that this will be changed to lowercase:

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # google_folder_iam_binding.subFolder1BQ will be updated in-place
  ~ resource "google_folder_iam_binding" "subFolder1BQ" {
        etag    = "1234567="
        folder  = "folders/1234567"
        id      = "folders/1234567/roles/bigquery.dataViewer"
      ~ members = [
          - "user:Myuser@gmail.com",
          + "user:myuser101@gmail.com",
        ]
        role    = "roles/bigquery.dataViewer"
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Steps to Reproduce

  1. terraform apply to create initial resource
  2. terraform plan

Important Factoids

Accounts from my organisation are created using the correct casing (lower case).
At this time I haven't tried using any other policy binding actions, nor a service account.

@ghost ghost added the bug label Jun 19, 2019
@iamgeef
Copy link
Author

iamgeef commented Jun 19, 2019

I've just tried adding a user from an outside organisation and that remained in lowercase, and any uppercase chars in the tf config file were converted to lowercase too, so it does seem to just be the @gmail.com emails that are being capitalised

@ghost
Copy link

ghost commented Jul 25, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jul 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants