Skip to content

Commit 84f4c2f

Browse files
author
Pearl Dsilva
committed
fix read for port forward
1 parent 57ef4b1 commit 84f4c2f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cloudstack/resource_cloudstack_port_forward.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ func resourceCloudStackPortForwardImport(d *schema.ResourceData, meta interface{
244244

245245
ipAddressID := s[len(s)-1]
246246
d.SetId(ipAddressID)
247+
d.Set("ip_address_id", ipAddressID)
247248

248249
// Make sure the IP address exists
249250
if _, count, err := cs.Address.GetPublicIpAddressByID(
@@ -335,6 +336,8 @@ func resourceCloudStackPortForwardRead(d *schema.ResourceData, meta interface{})
335336
return err
336337
}
337338

339+
d.Set("ip_address_id", d.Id())
340+
338341
// Get all the forwards from the running environment
339342
p := cs.Firewall.NewListPortForwardingRulesParams()
340343
p.SetIpaddressid(d.Id())

0 commit comments

Comments
 (0)