cloudstack-terraform-provider icon indicating copy to clipboard operation
cloudstack-terraform-provider copied to clipboard

Unable to add a range for port forwarding

Open mhdsulaimzed opened this issue 11 months ago • 1 comments

resource "cloudstack_port_forward" "head_node_ssh" {
  ip_address_id = cloudstack_ipaddress.head_node_public_ip.id

  forward {
    protocol           = "tcp"
    private_port       = "22"
    public_port        = "22"
    virtual_machine_id = cloudstack_instance.head_node.id
  }

  depends_on = [cloudstack_ipaddress.head_node_public_ip]
}

is there a attribute to specify private and public port start and end port numbers

mhdsulaimzed avatar Jan 01 '25 14:01 mhdsulaimzed

@mhdsulaimzed

The portforwading resource doesn't have the parameters

privateendport publicendport

https://registry.terraform.io/providers/cloudstack/cloudstack/latest/docs/resources/port_forward

Will mark the issue as a improvement and try to address it in the next release

https://cloudstack.apache.org/api/apidocs-4.20/apis/createPortForwardingRule.html

kiranchavala avatar Feb 10 '25 05:02 kiranchavala