Skip to content

Commit cd20145

Browse files
authored
Add source_nat_ip_address attribute (#51)
1 parent f0b83ca commit cd20145

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

cloudstack/resource_cloudstack_network.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ func resourceCloudStackNetwork() *schema.Resource {
137137
ForceNew: true,
138138
},
139139

140+
"source_nat_ip_address": {
141+
Type: schema.TypeString,
142+
Computed: true,
143+
},
144+
140145
"source_nat_ip_id": {
141146
Type: schema.TypeString,
142147
Computed: true,
@@ -282,10 +287,12 @@ func resourceCloudStackNetworkCreate(d *schema.ResourceData, meta interface{}) e
282287
if err != nil {
283288
return fmt.Errorf("Error associating a new IP address: %s", err)
284289
}
290+
d.Set("source_nat_ip_address", ip.Ipaddress)
285291
d.Set("source_nat_ip_id", ip.Id)
286292

287293
// Set the additional partial
288294
d.SetPartial("source_nat_ip")
295+
d.SetPartial("source_nat_ip_address")
289296
d.SetPartial("source_nat_ip_id")
290297
}
291298

website/docs/r/network.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ The following attributes are exported:
7878
* `id` - The ID of the network.
7979
* `display_text` - The display text of the network.
8080
* `network_domain` - DNS domain for the network.
81+
* `source_nat_ip_address` - The associated source NAT IP.
8182
* `source_nat_ip_id` - The ID of the associated source NAT IP.
8283

8384
## Import

0 commit comments

Comments
 (0)