Skip to content

Commit c8279b9

Browse files
authored
added podid (#89)
1 parent 1942f60 commit c8279b9

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

cloudstack/resource_cloudstack_instance.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,11 @@ func resourceCloudStackInstance() *schema.Resource {
196196
Default: false,
197197
},
198198

199+
"pod_id": {
200+
Type: schema.TypeString,
201+
Optional: true,
202+
},
203+
199204
"tags": tagsSchema(),
200205
},
201206
}
@@ -344,6 +349,12 @@ func resourceCloudStackInstanceCreate(d *schema.ResourceData, meta interface{})
344349
p.SetHostid(hostid.(string))
345350
}
346351

352+
// If a pod_id is supplied, add it to the parameter struct
353+
354+
if podid, ok := d.GetOk("pod_id"); ok {
355+
p.SetPodid(podid.(string))
356+
}
357+
347358
// If a cluster_id is supplied, add it to the parameter struct
348359

349360
if clusterid, ok := d.GetOk("cluster_id"); ok {

website/docs/r/instance.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ The following arguments are supported:
3737
* `host_id` - (Optional) destination Host ID to deploy the VM to - parameter available
3838
for root admin only
3939

40+
* `pod_id` - (Optional) destination Pod ID to deploy the VM to - parameter available for root admin only
41+
4042
* `cluster_id` - (Optional) destination Cluster ID to deploy the VM to - parameter available
4143
for root admin only
4244

0 commit comments

Comments
 (0)