File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -324,11 +324,6 @@ func (d *Driver) SetConfigFromFlags(fl drivers.DriverOptions) error {
324
324
d .UpdateCount = fl .Int (flAzureUpdateDomainCount )
325
325
d .DiskSize = fl .Int (flAzureDiskSize )
326
326
d .NSG = fl .String (flAzureNSG )
327
- var err error
328
- d .nsgUsedInPool = len (d .NSG ) > 0
329
- if d .nsgResource , err = d .resolveNSGReference (d .NSG ); err != nil {
330
- return err
331
- }
332
327
333
328
d .ClientID = fl .String (flAzureClientID )
334
329
d .ClientSecret = fl .String (flAzureClientSecret )
@@ -414,6 +409,10 @@ func (d *Driver) Create() error {
414
409
}
415
410
customData = base64 .StdEncoding .EncodeToString (buf )
416
411
}
412
+ d .nsgUsedInPool = len (d .NSG ) > 0
413
+ if d .nsgResource , err = d .resolveNSGReference (d .NSG ); err != nil {
414
+ return err
415
+ }
417
416
418
417
if err := c .CreateResourceGroup (ctx , d .ResourceGroup , d .Location ); err != nil {
419
418
return err
@@ -483,6 +482,10 @@ func (d *Driver) Remove() error {
483
482
if err != nil {
484
483
return err
485
484
}
485
+ d .nsgUsedInPool = len (d .NSG ) > 0
486
+ if d .nsgResource , err = d .resolveNSGReference (d .NSG ); err != nil {
487
+ return err
488
+ }
486
489
487
490
if err := c .DeleteVirtualMachineIfExists (ctx , d .ResourceGroup , d .naming ().VM ()); err != nil {
488
491
return err
You can’t perform that action at this time.
0 commit comments