mirror of
https://github.com/openshift/installer.git
synced 2026-02-05 15:47:14 +01:00
Merge pull request #10213 from patrickdillon/ocpbugs-69735-private-ssh
OCPBUGS-69735: handle SSH rule deletion for Azure private
This commit is contained in:
@@ -641,7 +641,15 @@ func (p *Provider) PostDestroy(ctx context.Context, in clusterapi.PostDestroyerI
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to delete security rule: %w", err)
|
||||
}
|
||||
|
||||
}
|
||||
_, err = networkClientFactory.NewInboundNatRulesClient().Get(
|
||||
ctx,
|
||||
resourceGroupName,
|
||||
in.Metadata.InfraID,
|
||||
sshRuleName,
|
||||
nil,
|
||||
)
|
||||
if err == nil {
|
||||
err = deleteInboundNatRule(ctx, &inboundNatRuleInput{
|
||||
resourceGroupName: resourceGroupName,
|
||||
loadBalancerName: in.Metadata.InfraID,
|
||||
@@ -652,7 +660,6 @@ func (p *Provider) PostDestroy(ctx context.Context, in clusterapi.PostDestroyerI
|
||||
return fmt.Errorf("failed to delete inbound nat rule: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user