[SQL Migration] Add storage/MI connectivity validation (#22410)

* wip

* Add SQL VM POC

* Undo azurecore changes

* Add warning banner instead of blocking on next

* Fix warning banner behavior

* Add private endpoint support

* Fix navigation issue

* Add offline scenario

* Address PR comments

* Fix merge conflicts
This commit is contained in:
Raymond Truong
2023-03-29 12:48:22 -07:00
committed by GitHub
parent e70865ff20
commit 4867a3747c
4 changed files with 164 additions and 11 deletions

View File

@@ -32,7 +32,8 @@ export interface NetworkInterfaceIpConfiguration extends NetworkResource {
privateIPAddress: string,
privateIPAddressVersion: string,
provisioningState: string,
publicIPAddress: NetworkResource
publicIPAddress: NetworkResource,
subnet: { id: string }
}
}
@@ -42,6 +43,19 @@ export interface PublicIpAddress extends NetworkResource {
}
}
export interface PrivateEndpointConnection extends NetworkResource {
properties: {
privateEndpoint: { id: string },
privateLinkServiceConnectionState: { description: string, status: string }
}
}
export interface PrivateEndpoint extends NetworkResource {
properties: {
subnet: { id: string }
}
}
export class NetworkInterfaceModel {
public static IPv4VersionType = "IPv4".toLocaleLowerCase();
private static NETWORK_API_VERSION = '2022-09-01';
@@ -145,4 +159,13 @@ export class NetworkInterfaceModel {
return networkInterfaces;
}
public static async getPrivateEndpoint(account: azdata.Account, subscription: Subscription, privateEndpointId: string): Promise<PrivateEndpoint> {
return getAzureResourceGivenId(account, subscription, privateEndpointId, this.NETWORK_API_VERSION);
}
public static getVirtualNetworkFromSubnet(subnetId: string): string {
return subnetId.replace(RegExp('^(.*?)/virtualNetworks/'), '').replace(RegExp('/subnets/.*'), '').toLowerCase();
}
}