-
Notifications
You must be signed in to change notification settings - Fork 13
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
Detect specific supported cloud providers #22
Comments
There's no waste of time since all the providers are checked concurrently. When the correct provider is identifier, other checks are cancelled immediately. The only case where the library takes considerable time to respond is when the environment is not one of the supported cloud providers. See this comment for additional info - #12 (comment). |
I understand that you wish to keep the api simple, but at the same time I understand the need for not checking for resources that will never be. An optional param is also still pretty simple to me, heck this feature was even part of the API up until April, just as an opposite "excluded" param.
This is the exact case I am trying to prevent, we wanted to use in our application which does run quite often on environments that are not supported. The more cloud providers it has to check the more resources and time that is wasted, even if concurrent. I appreciate you responding and hope that you reconsider but I understand either way. Feel free to close if your decision is final. Thanks. |
Cloud detect has the capability to detect multiple cloud providers, however some applications may only support a few cloud providers and trying to detect the others is a waste of time and resources. I propose accepting a list of cloud providers that a user wants to detect.
I have attached sample code below but would me more than willing to create a PR to implement this if you are open to this feature request.
For example an application may support running on AWS, Azure, or GCP but nothing else. The application would only care if it is one of those so attempting to detect others makes no sense to the using app.
A possible solution while keeping it dynamic would be to modify the cloud_detect/init.py class so that the usage would look like the sample script and the init.py would look like the code below the sample script.
The text was updated successfully, but these errors were encountered: