aboutsummaryrefslogtreecommitdiff
path: root/libvirt
diff options
context:
space:
mode:
authormluu <mluu@lancope.com>2016-09-28 13:44:17 -0700
committerFlavio Castelli <flavio@castelli.me>2018-01-14 15:16:14 +0100
commit29cd517335347ed7a8b190e60664887a9b715f09 (patch)
tree27808f149021705d77630e64c91badfebb09f526 /libvirt
parentd4863a5da629376462a0ca431c0e84f56f1cf180 (diff)
downloadterraform-provider-libvirt-29cd517335347ed7a8b190e60664887a9b715f09.tar
terraform-provider-libvirt-29cd517335347ed7a8b190e60664887a9b715f09.tar.gz
fix difference detection when using an existing bridge network
given the terraform: ```json resource "libvirt_domain" "myvm" { network_interface { bridge = "some-bridge" network_name = "existing-bridge-network" } } ``` `terraform plan` would always think it needs to re-apply the domain
Diffstat (limited to 'libvirt')
-rw-r--r--libvirt/resource_libvirt_domain.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/libvirt/resource_libvirt_domain.go b/libvirt/resource_libvirt_domain.go
index 404fcb84..c0fbb615 100644
--- a/libvirt/resource_libvirt_domain.go
+++ b/libvirt/resource_libvirt_domain.go
@@ -1065,6 +1065,7 @@ func resourceLibvirtDomainRead(d *schema.ResourceData, meta interface{}) error {
}
case "bridge":
netIface["bridge"] = networkInterfaceDef.Source.Bridge
+ netIface["network_name"] = networkInterfaceDef.Source.Network
case "direct":
{
switch networkInterfaceDef.Source.Mode {