terraform-provider-openstack
terraform-provider-openstack copied to clipboard
L7Policy: Action REDIRECT_PREFIX
Terraform Version
Terraform v1.1.3
Affected Resource(s)
openstack_lb_l7policy_v2
Terraform Configuration Files
resource "openstack_lb_l7policy_v2" "l7policy_1" {
name = "test"
action = "REDIRECT_PREFIX"
description = "test l7 policy"
position = 1
listener_id = openstack_lb_listener_v2.listener_1.id
redirect_url = "https://foo.bar"
}
Output
╷
│ Error: expected action to be one of [REDIRECT_TO_POOL REDIRECT_TO_URL REJECT], got REDIRECT_PREFIX
│
│ with openstack_lb_l7policy_v2.l7policy_1,
│ on main.tf line 58, in resource "openstack_lb_l7policy_v2" "l7policy_1":
│ 58: action = "REDIRECT_PREFIX"
│
╵
Expected Behavior
L7Policy should get created.
Action REDIRECT_PREFIX
should be supported.
Actual Behavior
An error gets thrown, because REDIRECT_PREFIX
action is not implemented.
Steps to Reproduce
terraform apply
References
https://github.com/gophercloud/gophercloud/issues/2322 https://docs.openstack.org/api-ref/load-balancer/v2/?expanded=create-an-l7-policy-detail#create-an-l7-policy
Please implement this now that https://github.com/gophercloud/gophercloud/pull/2324 has enabled it downstream
Is there an ETA when this will be implemented?
This repo is not maintained so don't expect anything. Openstack is just tumbleweed for devops
@nikParasyr Sorry to bother you, but would it be possible to implement this ? Thanks!
@nikParasyr i was trying to see how this goes but for some reason the l7policies
don't module i see don't have the fix you have
even tho go.mod shows 1.5.1-.... and this was in 1.5.0 -- am i missing something silly?
@mnaser loadbalancer
resources support both lbaas and octavia. The gophercloud libraries used by default are for lbaas. This is why you dont see it available. And also this is why small "small additions" as this one are more complicated. An example PR on how to overcome this is this one.
Let me know if you need more help
( I was actually hoping to get some time to work on lb -- either deprecating lbaas or refactoring the code so that additions for octavia are easier. We have a lot of improvements/additions on octavia that are stalled due to the situation explained above, but i havent been able to allocate time to tackle it :/ and also not sure if ill be able to in the near future )
@nikParasyr lbaas started to be deprecated in 2018 and fully removed in 2020...
I think if the maintainers don't have an interest in maintaining that (and I assume no one has stepped up to address this) -- we should move on to the Octavia world.
If we REALLY want to be extra nice we can cut a new major release that drops lbaas support and keep an older stable/1.0 branch maybe?
lbaas started to be deprecated in 2018 and fully removed in 2020...
I am aware :)
we should move on to the Octavia world.
Agreed. This would still require a refactor of all the LB resources. Well not refactor, but removing all obsolete code etc. My intention was to create a separate issue announcing the potential removal of support for lbaas_v2 and see how people felt about it. Then, given the time and depending on the input of users, either work on removing the code and deprecating lbaas_v2 OR refactor it in a way that is much easier to add octavia features and keep lbaas_v2. My personal opinion would be to completely remove lbaas_v2.
Keep in mind that we dont have any official deprecation policy and we "want" to support all versions
If you have the time to work on this i would propose:
- open a seperate ticket advocating for the removal of lbaas_v2 where we ask for upvote/downvote
- give it some time till we gather input
- in the meantime check how the removal should work etc
- implement it ( depending on how we plan it i might be able to assist in some resources but not all, for sure i can help on reviews etc to streamline it)
Opened related ticket https://github.com/terraform-provider-openstack/terraform-provider-openstack/issues/1638 for deprecation of neutron lbaas