You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2024/03/05 09:22:50 UTC
(cloudstack-terraform-provider) branch main updated: added podid (#89)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-terraform-provider.git
The following commit(s) were added to refs/heads/main by this push:
new c8279b9 added podid (#89)
c8279b9 is described below
commit c8279b9ae5f45f29c16322ad21271e2325ec3d81
Author: kiranchavala <ki...@gmail.com>
AuthorDate: Tue Mar 5 14:52:44 2024 +0530
added podid (#89)
---
cloudstack/resource_cloudstack_instance.go | 11 +++++++++++
website/docs/r/instance.html.markdown | 2 ++
2 files changed, 13 insertions(+)
diff --git a/cloudstack/resource_cloudstack_instance.go b/cloudstack/resource_cloudstack_instance.go
index 0c1a6bb..03aaf59 100644
--- a/cloudstack/resource_cloudstack_instance.go
+++ b/cloudstack/resource_cloudstack_instance.go
@@ -196,6 +196,11 @@ func resourceCloudStackInstance() *schema.Resource {
Default: false,
},
+ "pod_id": {
+ Type: schema.TypeString,
+ Optional: true,
+ },
+
"tags": tagsSchema(),
},
}
@@ -344,6 +349,12 @@ func resourceCloudStackInstanceCreate(d *schema.ResourceData, meta interface{})
p.SetHostid(hostid.(string))
}
+ // If a pod_id is supplied, add it to the parameter struct
+
+ if podid, ok := d.GetOk("pod_id"); ok {
+ p.SetPodid(podid.(string))
+ }
+
// If a cluster_id is supplied, add it to the parameter struct
if clusterid, ok := d.GetOk("cluster_id"); ok {
diff --git a/website/docs/r/instance.html.markdown b/website/docs/r/instance.html.markdown
index b5021cc..2510732 100644
--- a/website/docs/r/instance.html.markdown
+++ b/website/docs/r/instance.html.markdown
@@ -37,6 +37,8 @@ The following arguments are supported:
* `host_id` - (Optional) destination Host ID to deploy the VM to - parameter available
for root admin only
+* `pod_id` - (Optional) destination Pod ID to deploy the VM to - parameter available for root admin only
+
* `cluster_id` - (Optional) destination Cluster ID to deploy the VM to - parameter available
for root admin only