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
Use filtering to improve performance of agent pool data source #508
Conversation
8fdbda0
to
cc1fe38
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.
Looks 🔥 (won't approve until GA though)! Do you think we can improve the import
of this resource with this new functionality?
Im not sure exactly what you mean? Is there inefficiencies in how resources are imported by default? |
Not an inefficiency per-se, but if we look at the current terraform-provider-tfe/tfe/resource_tfe_agent_pool.go Lines 17 to 19 in 6f515c3
It just supports importing by ID. We can potentially extend this to support importing using an |
cc1fe38
to
560d03b
Compare
560d03b
to
0ef4ce5
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.
Approved 👍
Description
Once agent pool filtering is enabled (currently off in production behind the
remove-agent-pool-limit
feature flag) we can filter agent pool list requests by agent pool name. This improves performance of the agent pool data source when the organization has >20 agent pools by reducing the number of API calls we need to make in order to loop through all of the pages of agent poolsTesting plan
remove-agent-pool-limit
feature flag off, the data source resolves the agent poolremove-agent-pool-limit
feature flag on, the data source resolves the agent pool even fasterExternal links
Output from acceptance tests