terraform-provider-gsuite
terraform-provider-gsuite copied to clipboard
Attribute gets ignored
I've been playing around and it's a pretty great provider, thanks!
I've hit a weird situation with a newly created user:
- create a user with a random password and
change_password_next_login = true
- 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?
Possibly API's changed underneath us, will need to look into this.
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"
}
}
What happens if you set it to ""
?
Yeah, tried that and it still sees it as null and won't send it as parameter. 🤔