Skip to content

Commit 481a7e1

Browse files
authored
auth: Remove org preferences validation (#2433)
* Remove the validation for theme and timezone * Upodate docs
1 parent 3ef9440 commit 481a7e1

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

docs/data-sources/organization_preferences.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ data "grafana_organization_preferences" "test" {}
2828

2929
- `home_dashboard_uid` (String) The Organization home dashboard UID. This is only available in Grafana 9.0+.
3030
- `id` (String) The ID of this resource.
31-
- `theme` (String) The Organization theme. Available values are `light`, `dark`, `system`, or an empty string for the default.
32-
- `timezone` (String) The Organization timezone. Available values are `utc`, `browser`, or an empty string for the default.
31+
- `theme` (String) The Organization theme. Any string value is supported, including custom themes. Common values are `light`, `dark`, `system`, or an empty string for the default.
32+
- `timezone` (String) The Organization timezone. Any string value is supported, including IANA timezone names. Common values are `utc`, `browser`, or an empty string for the default.
3333
- `week_start` (String) The Organization week start day. Available values are `sunday`, `monday`, `saturday`, or an empty string for the default.

docs/resources/organization_preferences.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ resource "grafana_organization_preferences" "test" {
2828

2929
- `home_dashboard_uid` (String) The Organization home dashboard UID. This is only available in Grafana 9.0+.
3030
- `org_id` (String) The Organization ID. If not set, the Org ID defined in the provider block will be used.
31-
- `theme` (String) The Organization theme. Available values are `light`, `dark`, `system`, or an empty string for the default.
32-
- `timezone` (String) The Organization timezone. Available values are `utc`, `browser`, or an empty string for the default.
31+
- `theme` (String) The Organization theme. Any string value is supported, including custom themes. Common values are `light`, `dark`, `system`, or an empty string for the default.
32+
- `timezone` (String) The Organization timezone. Any string value is supported, including IANA timezone names. Common values are `utc`, `browser`, or an empty string for the default.
3333
- `week_start` (String) The Organization week start day. Available values are `sunday`, `monday`, `saturday`, or an empty string for the default. Defaults to ``.
3434

3535
### Read-Only

internal/resources/grafana/resource_organization_preferences.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,19 @@ func resourceOrganizationPreferences() *common.Resource {
3131
Schema: map[string]*schema.Schema{
3232
"org_id": orgIDAttribute(),
3333
"theme": {
34-
Type: schema.TypeString,
35-
Optional: true,
36-
Description: "The Organization theme. Available values are `light`, `dark`, `system`, or an empty string for the default.",
37-
ValidateFunc: validation.StringInSlice([]string{"light", "dark", "system", ""}, false),
34+
Type: schema.TypeString,
35+
Optional: true,
36+
Description: "The Organization theme. Any string value is supported, including custom themes. Common values are `light`, `dark`, `system`, or an empty string for the default.",
3837
},
3938
"home_dashboard_uid": {
4039
Type: schema.TypeString,
4140
Optional: true,
4241
Description: "The Organization home dashboard UID. This is only available in Grafana 9.0+.",
4342
},
4443
"timezone": {
45-
Type: schema.TypeString,
46-
Optional: true,
47-
Description: "The Organization timezone. Available values are `utc`, `browser`, or an empty string for the default.",
48-
ValidateFunc: validation.StringInSlice([]string{"utc", "browser", ""}, false),
44+
Type: schema.TypeString,
45+
Optional: true,
46+
Description: "The Organization timezone. Any string value is supported, including IANA timezone names. Common values are `utc`, `browser`, or an empty string for the default.",
4947
},
5048
"week_start": {
5149
Type: schema.TypeString,

0 commit comments

Comments
 (0)