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

Requesting the ability to use a port list in terraform for f5networks/bigip provider #940

Open
WyrickC opened this issue Feb 15, 2024 · 3 comments

Comments

@WyrickC
Copy link

WyrickC commented Feb 15, 2024

Hi,

I'm requesting the ability to use a port list in terraform so I can specify a range of ports for my virtual server to listen on. This can be done in the F5 UI but not terraform according to the documentation

Ideally, I would like to be able to do something like this:

resource "bigip_ltm_virtual_server" "VS_EXAMPLE" {
pool = "/Common/POOL_EXAMPLE"
name = "/Common/VS_EXAMPLE"
description = ""
destination = "10.0.0.0"
translate_port = "enabled"
ip_protocol = "any"
port = [514, 12201, 12204, 12205]
}

Any suggestions or workarounds in the meantime?

@pgouband
Copy link
Collaborator

Hi @WyrickC,

Have you tried using AS3?

@WyrickC
Copy link
Author

WyrickC commented Feb 15, 2024

I have not. Can that be used to JSON port lists for a VS, or even the whole VS config? And were there any plans to add the port list option to terraform in the future? Thanks for the reply

@pgouband
Copy link
Collaborator

pgouband commented Feb 16, 2024

Hi @WyrickC,

Here an example of AS with port list:
https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/declarations/non-http-services.html#creating-port-and-address-lists-for-a-service

Another way of doing the configuration is using traffic matching criteria:

resource "bigip_command" "create-portlist" {
  commands = ["create net port-list /Common/portlist ports add { 80 } ports add { 443 }"]
}
resource "bigip_command" "create_trafficmatchingcriteria" {
  commands = ["create ltm traffic-matching-criteria /Common/test-traffic-matching destination-address-inline 10.0.0.1 destination-port-list /Common/portlist "]
}
resource "bigip_ltm_virtual_server" "VS_EXAMPLE" {
	pool = "/Common/POOL_EXAMPLE"
	name = "/Common/VS_EXAMPLE"
	description = ""
	translate_port = "enabled"
	ip_protocol = "any"
	trafficmatching_criteria = "/Common/test-traffic-matching"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants