fabiomatavelli commented on code in PR #71:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/71#discussion_r1640111066


##########
cloudstack/resource_cloudstack_network.go:
##########
@@ -176,14 +175,12 @@ func resourceCloudStackNetworkCreate(d 
*schema.ResourceData, meta interface{}) e
                return e.Error()
        }
 
-       // Compute/set the display text
-       displaytext, ok := d.GetOk("display_text")
-       if !ok {
-               displaytext = name
-       }
-
        // Create a new parameter struct
-       p := cs.Network.NewCreateNetworkParams(displaytext.(string), name, 
networkofferingid, zoneid)
+       p := cs.Network.NewCreateNetworkParams(name, networkofferingid, zoneid)
+
+       if displaytext, ok := d.GetOk("display_text"); ok {
+               p.SetDisplaytext(displaytext.(string))

Review Comment:
   Fixed, I've added an `else` condition to set the display text with the 
`name` in case the `display_text` param is not set.



-- 
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: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to