providers/nomad: use DefaultConfig to intialize all fields

This commit is contained in:
Mitchell Hashimoto 2016-11-19 10:20:54 -08:00
parent 283d49f12f
commit 4406e27eaa
No known key found for this signature in database
GPG Key ID: 744E147AA52F5B0A

View File

@ -35,10 +35,9 @@ func Provider() terraform.ResourceProvider {
} }
func providerConfigure(d *schema.ResourceData) (interface{}, error) { func providerConfigure(d *schema.ResourceData) (interface{}, error) {
config := &api.Config{ config := api.DefaultConfig()
Address: d.Get("address").(string), config.Address = d.Get("address").(string)
Region: d.Get("region").(string), config.Region = d.Get("region").(string)
}
client, err := api.NewClient(config) client, err := api.NewClient(config)
if err != nil { if err != nil {