|
|
|
@ -28,6 +28,7 @@ import ( |
|
|
|
|
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" |
|
|
|
|
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud" |
|
|
|
|
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" |
|
|
|
|
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to" |
|
|
|
|
"github.com/Azure/azure-sdk-for-go/sdk/azidentity" |
|
|
|
|
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4" |
|
|
|
|
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2" |
|
|
|
@ -638,7 +639,7 @@ func (client *azureClient) getNetworkInterfaceByID(ctx context.Context, networkI |
|
|
|
|
return nil, fmt.Errorf("could not parse network interface ID: %w", err) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
resp, err := client.nic.Get(ctx, r.ResourceGroupName, r.Name, nil) |
|
|
|
|
resp, err := client.nic.Get(ctx, r.ResourceGroupName, r.Name, &armnetwork.InterfacesClientGetOptions{Expand: to.Ptr("IPConfigurations/PublicIPAddress")}) |
|
|
|
|
if err != nil { |
|
|
|
|
var responseError *azcore.ResponseError |
|
|
|
|
if errors.As(err, &responseError) && responseError.StatusCode == http.StatusNotFound { |
|
|
|
|