Skip to content

Commit b684013

Browse files
authored
fix: Add DiffSuppressFunc on argocd_cluster.server (#353)
1 parent 0155fb7 commit b684013

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

argocd/schema_cluster.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package argocd
22

33
import (
44
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
5+
"strings"
56
)
67

78
func clusterSchema() map[string]*schema.Schema {
@@ -26,6 +27,9 @@ func clusterSchema() map[string]*schema.Schema {
2627
Type: schema.TypeString,
2728
Description: "Server is the API server URL of the Kubernetes cluster.",
2829
Optional: true,
30+
DiffSuppressFunc: func(k, oldValue, newValue string, d *schema.ResourceData) bool {
31+
return oldValue == strings.TrimRight(newValue, "/")
32+
},
2933
},
3034
"shard": {
3135
Type: schema.TypeString,

0 commit comments

Comments
 (0)