diff --git a/azure/plugin.go b/azure/plugin.go index c29b8a8c..821c7478 100644 --- a/azure/plugin.go +++ b/azure/plugin.go @@ -23,6 +23,12 @@ func Plugin(ctx context.Context) *plugin.Plugin { DefaultIgnoreConfig: &plugin.IgnoreConfig{ ShouldIgnoreErrorFunc: shouldIgnoreErrorPluginDefault(), }, + ConnectionKeyColumns: []plugin.ConnectionKeyColumn{ + { + Name: "subscription_id", + Hydrate: getSubscriptionIdForConnection, + }, + }, ConnectionConfigSchema: &plugin.ConnectionConfigSchema{ NewInstance: ConfigInstance, }, @@ -189,3 +195,12 @@ func Plugin(ctx context.Context) *plugin.Plugin { return p } + +func getSubscriptionIdForConnection(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (any, error) { + subscriptionID, err := getSubscriptionID(ctx, d, h) + if err != nil { + return nil, err + } + + return subscriptionID, nil +}