-
Notifications
You must be signed in to change notification settings - Fork 103
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
Add filtering option to list workspaces of a particular project #671
Add filtering option to list workspaces of a particular project #671
Conversation
a8272c4
to
3e8876c
Compare
3e8876c
to
b30078d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and straightforward! I did some interactive testing on it and it works perfectly. 🙌🏼
I'd like a tiny bit more robustness in the tests, and there's one glitchy comment needs removing; otherwise this is good.
27120cb
to
1b01657
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, sorry I got confused about the test setup 😅
One of these tests was flaking on this PR, probably because it was tacitly expecting that fewer than 20 workspaces ever exist at once on the CI TFC instance. The more tests we add that create temporary workspaces (like the ones in this PR), the more likely that test was to flake. Testing shared global state is always nasty and error-prone, but this commit adjusts a couple tests to make less precise assertions that hopefully still test the behavior of interest.
Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes. |
Description
This add the support for users to list all the workspaces associated to a particular project in an organization by providing project_id filter option. API docs: https://developer.hashicorp.com/terraform/cloud-docs/api-docs/workspaces#list-workspaces
Testing plan
Integration tests have been added to cover this. You can run them using the below command:
External links