Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

Attribute gets ignored #114

Open
astratto opened this issue Nov 21, 2019 · 4 comments
Open

Attribute gets ignored #114

astratto opened this issue Nov 21, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@astratto
Copy link

I've been playing around and it's a pretty great provider, thanks!

I've hit a weird situation with a newly created user:

  1. create a user with a random password and change_password_next_login = true
  2. turn the attribute to false and re-apply

The apply succeeds, but it keeps showing the diff and the attribute stays set to true.

A similar problem happens when setting a recovery phone, it gets set but I can't remove it.

Any ideas on how to troubleshoot this?

@DeviaVir DeviaVir added the bug Something isn't working label Nov 22, 2019
@DeviaVir
Copy link
Owner

Possibly API's changed underneath us, will need to look into this.

@astratto
Copy link
Author

Found the "issue" for the recovery_phone part.

Setting it to null is correctly detected as a change of the attribute, but the PUT doesn't send it.

  ~ resource "gsuite_user" "my_user" {
...
        name                       = {
            "family_name" = "My"
            "given_name"  = "User"
        }
      - recovery_phone             = "+34000000000" -> null
---[ REQUEST ]---------------------------------------
PUT /admin/directory/v1/users/...?alt=json&prettyPrint=false HTTP/1.1
Host: www.googleapis.com
User-Agent: google-api-go-client/0.5 (darwin amd64) Terraform/0.12.12
Content-Length: 55
Content-Type: application/json
X-Goog-Api-Client: gl-go/1.11.0 gdcl/20190802
Accept-Encoding: gzip

{
 "name": {
  "familyName": "My",
  "givenName": "User"
 }
}

@DeviaVir
Copy link
Owner

What happens if you set it to ""?

@astratto
Copy link
Author

Yeah, tried that and it still sees it as null and won't send it as parameter. 🤔

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants