Skip to content

Commit

Permalink
kubernetes: add registry_integration to ImportStateVerifyIgnore (#974)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething committed Apr 17, 2023
1 parent 88d2fd4 commit 1b7ae4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions digitalocean/kubernetes/import_kubernetes_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ func TestAccDigitalOceanKubernetesCluster_ImportBasic(t *testing.T) {
"kube_config", // because kube_config was completely different for imported state
"node_pool.0.node_count", // because import test failed before DO had started the node in pool
"updated_at", // because removing default tag updates the resource outside of Terraform
"registry_integration", // registry_integration state can not be known via the API
},
},
},
Expand Down
8 changes: 4 additions & 4 deletions digitalocean/kubernetes/resource_kubernetes_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,13 @@ func resourceDigitalOceanKubernetesClusterImportState(d *schema.ResourceData, me
return resourceDatas, nil
}

func enableRegistryIntegration(client *godo.Client, cluster_uuid string) error {
_, err := client.Kubernetes.AddRegistry(context.Background(), &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{cluster_uuid}})
func enableRegistryIntegration(client *godo.Client, clusterUUID string) error {
_, err := client.Kubernetes.AddRegistry(context.Background(), &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{clusterUUID}})
return err
}

func disableRegistryIntegration(client *godo.Client, cluster_uuid string) error {
_, err := client.Kubernetes.RemoveRegistry(context.Background(), &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{cluster_uuid}})
func disableRegistryIntegration(client *godo.Client, clusterUUID string) error {
_, err := client.Kubernetes.RemoveRegistry(context.Background(), &godo.KubernetesClusterRegistryRequest{ClusterUUIDs: []string{clusterUUID}})
return err
}

Expand Down

0 comments on commit 1b7ae4a

Please sign in to comment.