Skip to content

Commit

Permalink
fetch resource group, vNet, subnet value from infrastructure status
Browse files Browse the repository at this point in the history
  • Loading branch information
tedteng committed May 23, 2022
1 parent 6d410c9 commit 5b95f84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controller/bastion/actuator.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,13 @@ func getSubnet(ctx context.Context, factory azureclient.Factory, vNet, subnetWor
return nil, err
}

subnet, err := subnetClient.Get(ctx, opt.ResourceGroupName, opt.VirtualNetwork, opt.Subnetwork, "")
subnet, err := subnetClient.Get(ctx, opt.ResourceGroupName, vNet, subnetWork, "")
if err != nil {
return nil, err
}

if subnet == nil {
logger.Info("subnet not found,", "subnet_name", opt.Subnetwork)
logger.Info("subnet not found,", "subnet_name", subnetWork)
return nil, nil
}

Expand Down

0 comments on commit 5b95f84

Please sign in to comment.