Fix "malformed url" bug in instance template when using network name
This commit is contained in:
parent
57bea9f26c
commit
4fd5c72540
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue