@@ -177,6 +177,13 @@ func ResourceDigitalOceanKubernetesCluster() *schema.Resource {
177177 Type : schema .TypeString ,
178178 Optional : true ,
179179 },
180+ "expanders" : {
181+ Type : schema .TypeList ,
182+ Optional : true ,
183+ Elem : & schema.Schema {
184+ Type : schema .TypeString ,
185+ },
186+ },
180187 },
181188 },
182189 },
@@ -533,13 +540,14 @@ func resourceDigitalOceanKubernetesClusterUpdate(ctx context.Context, d *schema.
533540 if d .HasChanges ("name" , "tags" , "auto_upgrade" , "surge_upgrade" , "maintenance_policy" , "ha" , controlPlaneFirewallField , "cluster_autoscaler_configuration" , routingAgentField ) {
534541
535542 opts := & godo.KubernetesClusterUpdateRequest {
536- Name : d .Get ("name" ).(string ),
537- Tags : tag .ExpandTags (d .Get ("tags" ).(* schema.Set ).List ()),
538- AutoUpgrade : godo .PtrTo (d .Get ("auto_upgrade" ).(bool )),
539- SurgeUpgrade : d .Get ("surge_upgrade" ).(bool ),
540- HA : godo .PtrTo (d .Get ("ha" ).(bool )),
541- ControlPlaneFirewall : expandControlPlaneFirewallOpts (d .Get (controlPlaneFirewallField ).([]interface {})),
542- RoutingAgent : expandRoutingAgentOpts (d .Get (routingAgentField ).([]interface {})),
543+ Name : d .Get ("name" ).(string ),
544+ Tags : tag .ExpandTags (d .Get ("tags" ).(* schema.Set ).List ()),
545+ AutoUpgrade : godo .PtrTo (d .Get ("auto_upgrade" ).(bool )),
546+ SurgeUpgrade : d .Get ("surge_upgrade" ).(bool ),
547+ HA : godo .PtrTo (d .Get ("ha" ).(bool )),
548+ ControlPlaneFirewall : expandControlPlaneFirewallOpts (d .Get (controlPlaneFirewallField ).([]interface {})),
549+ RoutingAgent : expandRoutingAgentOpts (d .Get (routingAgentField ).([]interface {})),
550+ ClusterAutoscalerConfiguration : expandCAConfigOptsForUpdate (d .Get ("cluster_autoscaler_configuration" ).([]interface {})),
543551 }
544552
545553 if maint , ok := d .GetOk ("maintenance_policy" ); ok {
@@ -550,10 +558,6 @@ func resourceDigitalOceanKubernetesClusterUpdate(ctx context.Context, d *schema.
550558 opts .MaintenancePolicy = maintPolicy
551559 }
552560
553- if caConfig , ok := d .GetOk ("cluster_autoscaler_configuration" ); ok {
554- opts .ClusterAutoscalerConfiguration = expandCAConfigOpts (caConfig .([]interface {}))
555- }
556-
557561 _ , resp , err := client .Kubernetes .Update (context .Background (), d .Id (), opts )
558562 if err != nil {
559563 if resp != nil && resp .StatusCode == 404 {
0 commit comments