weizhouapache commented on code in PR #144:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/144#discussion_r2301077945


##########
cloudstack/data_source_cloudstack_instance.go:
##########
@@ -98,6 +103,7 @@ func dataSourceCloudstackInstanceRead(d 
*schema.ResourceData, meta interface{})
 
        cs := meta.(*cloudstack.CloudStackClient)
        p := cs.VirtualMachine.NewListVirtualMachinesParams()
+       p.SetProjectid(d.Get("projectid").(string))

Review Comment:
   ```suggestion
        if d.Get("projectid") != "" {
                p.SetProjectid(d.Get("projectid").(string))
        }
   ```



##########
cloudstack/resource_cloudstack_instance.go:
##########
@@ -453,6 +453,7 @@ func resourceCloudStackInstanceRead(d *schema.ResourceData, 
meta interface{}) er
        p := cs.Volume.NewListVolumesParams()
        p.SetType("ROOT")
        p.SetVirtualmachineid(d.Id())
+       p.SetProjectid(d.Get("project").(string))

Review Comment:
   ```suggestion
        if d.Get("projectid") != "" {
                p.SetProjectid(d.Get("projectid").(string))
        }
   ```



##########
cloudstack/data_source_cloudstack_ipaddress.go:
##########
@@ -81,6 +86,7 @@ func dataSourceCloudstackIPAddress() *schema.Resource {
 func datasourceCloudStackIPAddressRead(d *schema.ResourceData, meta 
interface{}) error {
        cs := meta.(*cloudstack.CloudStackClient)
        p := cs.Address.NewListPublicIpAddressesParams()
+       p.SetProjectid(d.Get("projectid").(string))

Review Comment:
   ```suggestion
        if d.Get("projectid") != "" {
                p.SetProjectid(d.Get("projectid").(string))
        }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to