Created
December 30, 2024 12:59
-
-
Save jikuja/6351cabfbf6b1f3145be17f3511bf332 to your computer and use it in GitHub Desktop.
ARG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources | |
| where array_length(properties.privateEndpointConnections) > 0 | |
| project resourceId = id, resourceName = name, resourceEnum = type, connection = properties.privateEndpointConnections, resourceLocation = location, resourceSubscriptionId = tolower(subscriptionId) | |
| mvexpand connection // usually just removes array wrapper from connection | |
| extend id = connection.id| extend name = tostring(split(id, "/")[10]) | |
| extend privateEndpointId = connection.properties.privateEndpoint.id | |
| extend privateEndpointSubscriptionId = tolower(split(connection.properties.privateEndpoint.id, "/")[2]) | |
| extend endpointName = tostring(split(privateEndpointId, "/")[8]) | |
| extend description = tostring(connection.properties.privateLinkServiceConnectionState.description) | |
| extend status = connection.properties.privateLinkServiceConnectionState.status | |
| join kind=leftouter ( | |
resourcecontainers | |
| where ['type'] == "microsoft.resources/subscriptions" | |
| project subscriptionId = tolower(subscriptionId), subscriptionName = name | |
) on $left.privateEndpointSubscriptionId == $right.subscriptionId | |
|where subscriptionName == "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment