Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Backwards compatibility in remove method.
Checking if NSG was not set which means it was created prior to new version. This will then just check for the default named one.

Signed-off-by: Mitchell Maler <mitchell.maler@live.com>
  • Loading branch information
mitchellmaler committed May 22, 2018
commit 7eaab8171106561ecddb2731129312573f6f540b
5 changes: 5 additions & 0 deletions drivers/azure/azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,11 @@ func (d *Driver) Remove() error {
if err := c.DeletePublicIPAddressIfExists(d.ResourceGroup, d.naming().IP()); err != nil {
return err
}
// Check if network security group was set by optional param and if not set it from naming.
// included for backwards compatibility else nsgs prior without name will be orphaned.
if d.NetworkSecurityGroup == "" {
d.NetworkSecurityGroup = d.naming().NSG()
}
if err := c.CleanupNetworkSecurityGroupIfExists(d.ResourceGroup, d.NetworkSecurityGroup); err != nil {
return err
}
Expand Down