bhouse-nexthop commented on code in PR #280:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/280#discussion_r2912199921


##########
website/docs/r/port_forward.html.markdown:
##########
@@ -25,6 +27,38 @@ resource "cloudstack_port_forward" "default" {
 }
 ```
 
+### Port Forward with Automatic Project Inheritance
+
+```hcl
+# Create a VPC in a project
+resource "cloudstack_vpc" "project_vpc" {
+  name         = "project-vpc"
+  cidr         = "10.0.0.0/16"
+  vpc_offering = "Default VPC offering"
+  project      = "my-project"
+  zone         = "zone-1"
+}
+
+# IP address automatically inherits project from VPC
+resource "cloudstack_ipaddress" "project_ip" {
+  vpc_id = cloudstack_vpc.project_vpc.id
+  zone   = "zone-1"
+}
+
+# Port forward automatically inherits project from IP address
+resource "cloudstack_port_forward" "project_forward" {
+  ip_address_id = cloudstack_ipaddress.project_ip.id
+  # project is automatically inherited from the IP address
+
+  forward {
+    protocol           = "tcp"
+    private_port       = 80
+    public_port        = 8080
+    virtual_machine_id = cloudstack_instance.web.id
+  }

Review Comment:
   fixed in bdbf89a



-- 
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