Fix "malformed url" bug in instance template when using network name

This commit is contained in:
Lars Wander 2015-09-15 15:52:43 -04:00
parent 57bea9f26c
commit 4fd5c72540
1 changed files with 2 additions and 4 deletions

View File

@ -305,11 +305,9 @@ func buildNetworks(d *schema.ResourceData, meta interface{}) (error, []*compute.
for i := 0; i < networksCount; i++ { for i := 0; i < networksCount; i++ {
prefix := fmt.Sprintf("network_interface.%d", i) prefix := fmt.Sprintf("network_interface.%d", i)
source := "global/networks/default" source := "global/networks/"
if v, ok := d.GetOk(prefix + ".network"); ok { if v, ok := d.GetOk(prefix + ".network"); ok {
if v.(string) != "default" { source += v.(string)
source = v.(string)
}
} }
// Build the networkInterface // Build the networkInterface