Skip to content

Commit

Permalink
Fix incompatible change from 77982e
Browse files Browse the repository at this point in the history
77982e7#diff-2f03be069459ebc91fcf0607d4d686d8R832
checks if the source network is a bridge but doesn't set the bridge
value correctly in the Terraform state just after.

See https://godoc.org/github.com/libvirt/libvirt-go-xml#DomainInterfaceSourceNetworkhttps://godoc.org/github.com/libvirt/libvirt-go-xml#DomainInterfaceSourceBridge
for reference.

Also, in that case, .Source.Network is not defined so better let it to the
default value.
  • Loading branch information
multani committed Aug 28, 2018
1 parent c1221a7 commit 2e93c78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libvirt/resource_libvirt_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ func resourceLibvirtDomainRead(d *schema.ResourceData, meta interface{}) error {
}
}
} else if networkInterfaceDef.Source.Bridge != nil {
netIface["bridge"] = networkInterfaceDef.Source.Bridge
netIface["bridge"] = networkInterfaceDef.Source.Bridge.Bridge
} else if networkInterfaceDef.Source.Direct != nil {
switch networkInterfaceDef.Source.Direct.Mode {
case "vepa":
Expand Down

0 comments on commit 2e93c78

Please sign in to comment.