File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ func (azureClient *ArmClient) initServiceDiscovery() {
135135 }
136136}
137137
138- // Connect triggers and logs connect message
139- func (azureClient * ArmClient ) Connect () error {
138+ // LazyConnect triggers and logs connect message
139+ func (azureClient * ArmClient ) LazyConnect () error {
140140 ctx := context .Background ()
141141
142142 azureClient .logger .Infof (
@@ -158,6 +158,16 @@ func (azureClient *ArmClient) Connect() error {
158158 } else {
159159 azureClient .logger .Warn (`unable to get Azure client information, cannot parse accesstoken` )
160160 }
161+ }
162+
163+ // Connect triggers and logs connect message
164+ func (azureClient * ArmClient ) Connect () error {
165+ ctx := context .Background ()
166+
167+ err := azureClient .LazyConnect ()
168+ if err != nil {
169+ return err
170+ }
161171
162172 subscriptionList , err := azureClient .ListSubscriptions (ctx )
163173 if err != nil {
You can’t perform that action at this time.
0 commit comments