From 351537a15d306f75505d8a9bad3e189406e9b79b Mon Sep 17 00:00:00 2001 From: John Houston Date: Mon, 5 Jun 2023 08:26:03 -0400 Subject: [PATCH] Revert "add `conflictsWith` to provider schema (#2084)" This reverts commit 550f2c1b95bb549234311cd87b646ec0a98d6edb. --- .changelog/2084.txt | 3 -- kubernetes/provider.go | 67 ++++++++++++++++++------------------------ 2 files changed, 28 insertions(+), 42 deletions(-) delete mode 100644 .changelog/2084.txt diff --git a/.changelog/2084.txt b/.changelog/2084.txt deleted file mode 100644 index 0c23381e47..0000000000 --- a/.changelog/2084.txt +++ /dev/null @@ -1,3 +0,0 @@ -```release-note:enhancement -`kubernetes/provider.go`: add `conflictsWith` to provider schema -``` diff --git a/kubernetes/provider.go b/kubernetes/provider.go index 88bc7faaa6..2bd548b062 100644 --- a/kubernetes/provider.go +++ b/kubernetes/provider.go @@ -40,57 +40,46 @@ func Provider() *schema.Provider { p := &schema.Provider{ Schema: map[string]*schema.Schema{ "host": { - Type: schema.TypeString, - Optional: true, - DefaultFunc: schema.EnvDefaultFunc("KUBE_HOST", nil), - Description: "The hostname (in form of URI) of Kubernetes master.", - ConflictsWith: []string{"config_path", "config_paths"}, + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("KUBE_HOST", ""), + Description: "The hostname (in form of URI) of Kubernetes master.", }, "username": { - Type: schema.TypeString, - Optional: true, - DefaultFunc: schema.EnvDefaultFunc("KUBE_USER", nil), - Description: "The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.", - ConflictsWith: []string{"config_path", "config_paths", "exec", "token", "client_certificate", "client_key"}, - RequiredWith: []string{"password", "host"}, + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("KUBE_USER", ""), + Description: "The username to use for HTTP basic authentication when accessing the Kubernetes master endpoint.", }, "password": { - Type: schema.TypeString, - Optional: true, - DefaultFunc: schema.EnvDefaultFunc("KUBE_PASSWORD", nil), - Description: "The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint.", - ConflictsWith: []string{"config_path", "config_paths", "exec", "token", "client_certificate", "client_key"}, - RequiredWith: []string{"username", "host"}, + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("KUBE_PASSWORD", ""), + Description: "The password to use for HTTP basic authentication when accessing the Kubernetes master endpoint.", }, "insecure": { - Type: schema.TypeBool, - Optional: true, - DefaultFunc: schema.EnvDefaultFunc("KUBE_INSECURE", nil), - Description: "Whether server should be accessed without verifying the TLS certificate.", - ConflictsWith: []string{"cluster_ca_certificate"}, + Type: schema.TypeBool, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("KUBE_INSECURE", false), + Description: "Whether server should be accessed without verifying the TLS certificate.", }, "client_certificate": { - Type: schema.TypeString, - Optional: true, - DefaultFunc: schema.EnvDefaultFunc("KUBE_CLIENT_CERT_DATA", nil), - Description: "PEM-encoded client certificate for TLS authentication.", - ConflictsWith: []string{"config_path", "config_paths", "username", "password"}, - RequiredWith: []string{"client_key"}, + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("KUBE_CLIENT_CERT_DATA", ""), + Description: "PEM-encoded client certificate for TLS authentication.", }, "client_key": { - Type: schema.TypeString, - Optional: true, - DefaultFunc: schema.EnvDefaultFunc("KUBE_CLIENT_KEY_DATA", nil), - Description: "PEM-encoded client certificate key for TLS authentication.", - ConflictsWith: []string{"config_path", "config_paths", "username", "password", "exec"}, - RequiredWith: []string{"client_certificate"}, + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("KUBE_CLIENT_KEY_DATA", ""), + Description: "PEM-encoded client certificate key for TLS authentication.", }, "cluster_ca_certificate": { - Type: schema.TypeString, - Optional: true, - DefaultFunc: schema.EnvDefaultFunc("KUBE_CLUSTER_CA_CERT_DATA", nil), - Description: "PEM-encoded root certificates bundle for TLS authentication.", - ConflictsWith: []string{"insecure"}, + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("KUBE_CLUSTER_CA_CERT_DATA", ""), + Description: "PEM-encoded root certificates bundle for TLS authentication.", }, "config_paths": { Type: schema.TypeList,