Easily add a $DS_PROMETHEUS
datasource variable with its templating to a Grafana dashboard with jq
or Jsonnet.
./templatize_dashboard_datasource.jq dasboard.json >dashboard-new.json
jsonnet - >dashboard-new.json <<EOF
local utils = import 'dashboard-utils.libsonnet';
(import 'dashboard.json') +
utils.withTemplatizedDatasource
EOF