Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add a range for port forwarding #157

Open
mhdsulaimzed opened this issue Jan 1, 2025 · 1 comment
Open

Unable to add a range for port forwarding #157

mhdsulaimzed opened this issue Jan 1, 2025 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@mhdsulaimzed
Copy link

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 added a commit to mhdsulaimzed/terraform-provider-cloudstack that referenced this issue Jan 1, 2025
)

Add support for port ranges in port forwarding rules by introducing optional
private_end_port and public_end_port fields. This allows users to specify
port ranges instead of just single ports when creating port forwarding rules.

- Add private_end_port and public_end_port fields as optional parameters
- Update createPortForward to handle end port configuration
- Modify read function to properly manage end port state
- Maintain backward compatibility with existing configurations

Fixes apache#157
@kiranchavala
Copy link
Collaborator

@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 kiranchavala added the enhancement New feature or request label Feb 10, 2025
@kiranchavala kiranchavala added this to the v0.6.0 milestone Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants