Closed nimbusscale closed 6 years ago
Looks like an azure session is being instantiated when we're registering the resources here: https://github.com/capitalone/cloud-custodian/blob/master/tools/c7n_azure/c7n_azure/resources/access_control.py#L45 the session seems to be required to fill out the enum spec for the access control resource, and the verbose logging is actually related to this PR here: https://github.com/capitalone/cloud-custodian/pull/2534
@erwelch @stefangordon I'm not too familiar with azure session management, is it possible to refactor the access control resource to prevent session creation during the plugin registration and instantiate the session elsewhere?
I'm thinking of doing lazy init on the get client method. Seems better. I will do it today or tomorrow. (Or some other solution)
When getting the latest from master and building via tox the
custodian
command generates this error when attempting to validate or run a policy that interacts with AWS resources.When install latest release things work as expected:
Here is the
nothing-policy.yaml
:This same error occurs when attempting to
custodian run
with the policy as well. I tried with a few different policies, but same issue with all them and this is the simplest of the bunch.