Check provider level zone as well when parsing zonal values. (#1455)

This commit is contained in:
Nathan McKinley 2018-05-08 16:30:31 -07:00 committed by GitHub
parent 11c8a52d35
commit 04a475d73d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -188,7 +188,10 @@ func parseZonalFieldValue(resourceType, fieldValue, projectSchemaField, zoneSche
zone, ok := d.GetOk(zoneSchemaField)
if !ok {
return nil, fmt.Errorf("A zone must be specified")
zone = config.Zone
if zone == "" {
return nil, fmt.Errorf("A zone must be specified")
}
}
return &ZonalFieldValue{