hashicorp / terraform-provider-googleworkspace

Terraform Provider for Google Workspace
https://registry.terraform.io/providers/hashicorp/googleworkspace
Mozilla Public License 2.0
130 stars 58 forks source link

Resolve bug in validation of a chrome_policy resource with multiple schema_values of differing type #472

Open w0de opened 10 months ago

w0de commented 10 months ago

Seeks to resolve #471

changes

Validation of chrome policy schema_values now expects there to always be exactly one proto field for any given schema_value. Previously all values were validated iteratively against all proto fields. This change seems reasonable - I don't believe it breaks an edge case. My test workspace's full policy schema does not have any schemas with conflicting field names.

But I'm unsure why the validation was first written this way. Concerning - Chesteron's fence, etc. (Git blame points to the initial commit only.) It may simply be a mistake which arose from a misunderstanding of (or changes in) schema structure. Or the misunderstanding may turn out to be mine :)!

I've added a relevant test case.

toddthiel commented 2 months ago

Would be good to get eyes on this issue. It's still a problem.