DeviaVir / terraform-provider-gsuite

A @HashiCorp Terraform provider for managing G Suite resources.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated values' default values get passed to the API

TheWolfNL opened this issue · comments

So who_can_add, who_can_ban_users, who_can_invite and who_can_modify_members have been deprecated in favour of who_can_moderate_members.

If I disable my overrides I get:

who_can_add                  = "NONE_CAN_ADD" -> "ALL_MANAGERS_CAN_ADD"
who_can_ban_users            = "NONE" -> "OWNERS_AND_MANAGERS"
who_can_invite               = "NONE_CAN_INVITE" -> "ALL_MANAGERS_CAN_INVITE"
who_can_moderate_members     = "NONE"
who_can_modify_members       = "NONE" -> "OWNERS_AND_MANAGERS"

Where this should result in no change.
I think it would be nice to make sure the provider doesn't pass on a for these deprecated options, if they haven't been set. but would need some pointers to get this done.
Not sure if removing the default values would be the way to go here.

@DeviaVir would love your input on this one :)

commented

The trouble I ran into with removing the default is that you still get those back when you try reading them, and terraform really (really) hates it when you send it data and it gets other data back; it will keep trying to update it.

Perhaps a solution here is to just throw them out completely.

I'm all for that solution and can get you a pr for it, but you might want to release that version with a minor version bump.
I saw something in the helper regarding removed values, so people would get a nice message as well.

Closed due to release 0.1.33