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.
This commit is contained in:
parent
e800a8d6cc
commit
5251193f87
|
@ -44,7 +44,7 @@ func Provider() terraform.ResourceProvider {
|
||||||
"api_key": &schema.Schema{
|
"api_key": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
DefaultFunc: envDefaultFunc("OS_AUTH_TOKEN"),
|
DefaultFunc: envDefaultFuncAllowMissing("OS_AUTH_TOKEN"),
|
||||||
},
|
},
|
||||||
"domain_id": &schema.Schema{
|
"domain_id": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
@ -64,7 +64,7 @@ func Provider() terraform.ResourceProvider {
|
||||||
"endpoint_type": &schema.Schema{
|
"endpoint_type": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
DefaultFunc: envDefaultFunc("OS_ENDPOINT_TYPE"),
|
DefaultFunc: envDefaultFuncAllowMissing("OS_ENDPOINT_TYPE"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue