Skip to content

Commit 409cdac

Browse files
committed
fix traffic type
1 parent 78ebd66 commit 409cdac

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

cloudstack/resource_cloudstack_traffic_type.go

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,29 @@ func resourceCloudStackTrafficTypeRead(d *schema.ResourceData, meta interface{})
171171
d.Set("traffic_type", trafficType.Traffictype)
172172
}
173173

174-
// Note: The TrafficType struct doesn't have fields for network labels or VLAN
175-
// We'll need to rely on what we store in the state
174+
if trafficType.Kvmnetworklabel != "" {
175+
d.Set("kvm_network_label", trafficType.Kvmnetworklabel)
176+
}
177+
178+
if trafficType.Vlan != "" {
179+
d.Set("vlan", trafficType.Vlan)
180+
}
181+
182+
if trafficType.Xennetworklabel != "" {
183+
d.Set("xen_network_label", trafficType.Xennetworklabel)
184+
}
185+
186+
if trafficType.Vmwarenetworklabel != "" {
187+
d.Set("vmware_network_label", trafficType.Vmwarenetworklabel)
188+
}
189+
190+
if trafficType.Hypervnetworklabel != "" {
191+
d.Set("hyperv_network_label", trafficType.Hypervnetworklabel)
192+
}
193+
194+
if trafficType.Ovm3networklabel != "" {
195+
d.Set("ovm3_network_label", trafficType.Ovm3networklabel)
196+
}
176197

177198
return nil
178199
}

0 commit comments

Comments
 (0)