From 5251193f8716689ca3c3b3b849c781916060cd31 Mon Sep 17 00:00:00 2001 From: Joe Topjian Date: Mon, 6 Jul 2015 03:14:13 +0000 Subject: [PATCH] Allow empty api_key and endpoint_type These two provider options are optional though if they are not set, the user will be prompted to enter values. By changing them to use the envDefaultFuncAllowMissing, the values are still passed in the environment if they are set and safely discarded if they are not. --- builtin/providers/openstack/provider.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/providers/openstack/provider.go b/builtin/providers/openstack/provider.go index 128e95c0a3..213acf9899 100644 --- a/builtin/providers/openstack/provider.go +++ b/builtin/providers/openstack/provider.go @@ -44,7 +44,7 @@ func Provider() terraform.ResourceProvider { "api_key": &schema.Schema{ Type: schema.TypeString, Optional: true, - DefaultFunc: envDefaultFunc("OS_AUTH_TOKEN"), + DefaultFunc: envDefaultFuncAllowMissing("OS_AUTH_TOKEN"), }, "domain_id": &schema.Schema{ Type: schema.TypeString, @@ -64,7 +64,7 @@ func Provider() terraform.ResourceProvider { "endpoint_type": &schema.Schema{ Type: schema.TypeString, Optional: true, - DefaultFunc: envDefaultFunc("OS_ENDPOINT_TYPE"), + DefaultFunc: envDefaultFuncAllowMissing("OS_ENDPOINT_TYPE"), }, },