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

TCP Port Ranges getting set as individual ports instead of ranges #490

Closed
toestreich opened this issue Sep 19, 2024 · 2 comments · Fixed by #496
Closed

TCP Port Ranges getting set as individual ports instead of ranges #490

toestreich opened this issue Sep 19, 2024 · 2 comments · Fixed by #496
Assignees
Labels
type/bug Something isn't working

Comments

@toestreich
Copy link

toestreich commented Sep 19, 2024

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.3.0

Affected Resource(s)

  • zpa_application_segment

Terraform Configuration Files

# Below is in a module
resource "zpa_application_segment" "this" {
  name        = var.name
  description = var.description

  enabled          = var.enabled
  health_reporting = var.health_reporting
  bypass_type      = var.bypass_type
  tcp_port_range   = var.tcp_ports
  udp_port_range   = var.udp_ports
  is_cname_enabled = var.cname_enabled

  domain_names = var.domain_names

  server_groups {
    id = local.all_server_ids
  }

  segment_group_id = data.zpa_segment_group.this.id
}

variable "tcp_ports" {
  type        = list(object({ from = string, to = string }))
  description = "TCP port ranges used to access the app."
}

module "app-seg" {
  source = "../../modules/zpa/app-segment"

  name             = "name"
  domain_names     = ["domain"]
  icmp_access_type = "PING"

  tcp_ports = [
    {
      from = "1",
      to   = "52"
    },
    {
      from = "54",
      to   = "65535"
    }
  ]
  udp_ports = [
    {
      from = "1",
      to   = "52"
    },
    {
      from = "54",
      to   = "65535"
    }
  ]

  segment_group_name = "Apps"
}

Debug Output

Note we are not changing the ports in the PR below. Terraform is just picking up that there is a difference from the statefile and is overwriting with what should be there.

~ tcp_port_range                = [
          - {
              - from = "1"
              - to   = "1"
            },
          + {
              + from = "1"
              + to   = "52"
            },
          - {
              - from = "52"
              - to   = "52"
            },
          - {
              - from = "54"
              - to   = "54"
            },
          + {
              + from = "54"
              + to   = "65535"
            },
          - {
              - from = "65535"
              - to   = "65535"
            },
        ]

Panic Output

Expected Behavior

The port ranges should be set to 1-52 and 54-65535

The ports are set to 1-1, 52-52, 54,54 and 65535-65535

  1. terraform apply

Important Factoids

References

  • #0000
@willguibr willguibr self-assigned this Sep 19, 2024
@willguibr willguibr added the type/bug Something isn't working label Oct 4, 2024
@willguibr willguibr added this to the Release v3.33.7 milestone Oct 4, 2024
@willguibr willguibr linked a pull request Oct 4, 2024 that will close this issue
9 tasks
@willguibr
Copy link
Member

@toestreich
We have implemented a fix in the latest v3.33.7 release.
Please test and let us know if it has addressed the issue you've reported.

Zscaler DevRel

@willguibr willguibr reopened this Oct 6, 2024
@willguibr
Copy link
Member

Closing the issue as no feedback was provided.

Zscaler DevRel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
Status: 🚀 Shipped
Development

Successfully merging a pull request may close this issue.

2 participants