steampipe-plugin-sdk
steampipe-plugin-sdk copied to clipboard
d.Connection is nil if there are no specific connection attributes set
I'd expect d.Connection.Name
to always be available, even if no specific attributes are set.
Consider this hydrate function:
func getClusterConnection(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) {
return d.Connection, nil
}
If I have an "empty" config like below then I'm finding d.Connection
is nil.
connection "k8s_a" {
plugin = "kubernetes"
}
But everything works as expected if there is any attribute in the config, like this:
connection "k8s_a" {
plugin = "kubernetes"
config_path = "~/.kube/config"
}