Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cloudstack/resource_cloudstack_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ func resourceCloudStackNetwork() *schema.Resource {
ForceNew: true,
},

"source_nat_ip_address": {
Type: schema.TypeString,
Computed: true,
},

"source_nat_ip_id": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -282,10 +287,12 @@ func resourceCloudStackNetworkCreate(d *schema.ResourceData, meta interface{}) e
if err != nil {
return fmt.Errorf("Error associating a new IP address: %s", err)
}
d.Set("source_nat_ip_address", ip.Ipaddress)
d.Set("source_nat_ip_id", ip.Id)

// Set the additional partial
d.SetPartial("source_nat_ip")
d.SetPartial("source_nat_ip_address")
d.SetPartial("source_nat_ip_id")
}

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/network.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ The following attributes are exported:
* `id` - The ID of the network.
* `display_text` - The display text of the network.
* `network_domain` - DNS domain for the network.
* `source_nat_ip_address` - The associated source NAT IP.
* `source_nat_ip_id` - The ID of the associated source NAT IP.

## Import
Expand Down