File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ func Provider() terraform.ResourceProvider {
2020 "cert_path" : & schema.Schema {
2121 Type : schema .TypeString ,
2222 Optional : true ,
23- DefaultFunc : schema .EnvDefaultFunc ("DOCKER_CERT_PATH" , nil ),
23+ DefaultFunc : schema .EnvDefaultFunc ("DOCKER_CERT_PATH" , "" ),
2424 Description : "Path to directory with Docker TLS config" ,
2525 },
2626 },
Original file line number Diff line number Diff line change @@ -2322,6 +2322,24 @@ func TestSchemaMap_Input(t *testing.T) {
23222322 Err : false ,
23232323 },
23242324
2325+ "input ignored when default function returns an empty string" : {
2326+ Schema : map [string ]* Schema {
2327+ "availability_zone" : & Schema {
2328+ Type : TypeString ,
2329+ Default : "" ,
2330+ Optional : true ,
2331+ },
2332+ },
2333+
2334+ Input : map [string ]string {
2335+ "availability_zone" : "bar" ,
2336+ },
2337+
2338+ Result : map [string ]interface {}{},
2339+
2340+ Err : false ,
2341+ },
2342+
23252343 "input used when default function returns nil" : {
23262344 Schema : map [string ]* Schema {
23272345 "availability_zone" : & Schema {
You can’t perform that action at this time.
0 commit comments