From 7fe851000c1c3971feaf65717437742d59720141 Mon Sep 17 00:00:00 2001 From: Moritz Reinhardt Date: Thu, 19 Dec 2024 19:48:00 +0100 Subject: [PATCH] kubernetes: Add validation to maintenance_policy --- digitalocean/kubernetes/resource_kubernetes_cluster.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/digitalocean/kubernetes/resource_kubernetes_cluster.go b/digitalocean/kubernetes/resource_kubernetes_cluster.go index 9abb46df8..15b4ab570 100644 --- a/digitalocean/kubernetes/resource_kubernetes_cluster.go +++ b/digitalocean/kubernetes/resource_kubernetes_cluster.go @@ -121,9 +121,10 @@ func ResourceDigitalOceanKubernetesCluster() *schema.Resource { Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ "day": { - Type: schema.TypeString, - Optional: true, - Computed: true, + Type: schema.TypeString, + Optional: true, + Computed: true, + ValidateFunc: validation.StringInSlice([]string{"any", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"}, true), }, "start_time": { Type: schema.TypeString,