grafana / terraform-provider-schemas

Mozilla Public License 2.0
32 stars 1 forks source link

Handle enums #12

Open AgnesToulet opened 1 year ago

AgnesToulet commented 1 year ago

We should enforce enums fields like the loading state in the dashboard kind. The provider should return an error before running apply if the user enters a value that is outside of the list of authorized values.

This could be done using attribute validation or (maybe) by creating custom types for every subtype we need to handle (StringEnumType, IntEnumType...).