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

Allow settings tags for lb_listener_v2 #1438

Merged

Conversation

stinnux
Copy link
Contributor

@stinnux stinnux commented Sep 5, 2022

This allows setting tags for listener when using octavia.

The change is heavily "inspired" by the tag feature used in the loadbalancer resource and therefore uses the same approach.

@@ -218,6 +221,85 @@ func testAccCheckLBV2ListenerExists(n string, listener *listeners.Listener) reso
}
}

/**
* gophercloud doesn't return the tags in the structure. Need to fix tghis first.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

From what i can see gophercloud supports tags in the return struct, this was added: gophercloud/gophercloud#2214

And we are using a version that includes this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, it should be there. But somehow it's failing and I don't know what's wrong.

Error: found.Tags undefined (type *"github.com/gophercloud/gophercloud/openstack/networking/v2/extensions/lbaas_v2/listeners".Listener has no field or method Tags) (typecheck)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stinnux check my comment below

return fmt.Errorf("Error creating OpenStack load balancing client: %s", err)
}

found, err := listeners.Get(lbClient, rs.Primary.ID).Extract()
Copy link
Collaborator

@nikParasyr nikParasyr Sep 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should use octavia and not the lbaas_v2 that is used now

@kayrus
Copy link
Collaborator

kayrus commented Mar 11, 2023

@stinnux I rebased your branch to re-run tests.

@kayrus kayrus force-pushed the octavia-tags-listener branch 2 times, most recently from 2fca8a0 to 6669659 Compare March 11, 2023 19:41
Copy link
Collaborator

@kayrus kayrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nikParasyr nikParasyr merged commit 28d2cb3 into terraform-provider-openstack:main Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants