From 29c96e822701bc6d6703229392f73a774b516e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20T=C3=B6lle?= Date: Thu, 5 Oct 2023 07:39:55 +0200 Subject: [PATCH] fix: failed to load plugin schemas The schemas between the Plugin SDK Provider and the Plugin Framework Provider have different values. This is not allowed, as it causes inconstency, and the terraform-provider stops on startup with an error if this is detected. The "token" is not truly required in the old provider (or the new), because we fallback to the HCLOUD_TOKEN environment variable and have additional validation that verifies it is set. --- hcloud/provider.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hcloud/provider.go b/hcloud/provider.go index 44bf67c79..d2d7dd7f9 100644 --- a/hcloud/provider.go +++ b/hcloud/provider.go @@ -45,7 +45,7 @@ func Provider() *schema.Provider { Schema: map[string]*schema.Schema{ "token": { Type: schema.TypeString, - Required: true, + Optional: true, DefaultFunc: schema.EnvDefaultFunc("HCLOUD_TOKEN", nil), Description: "The Hetzner Cloud API token, can also be specified with the HCLOUD_TOKEN environment variable.", ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {