Provisioning Dashboards, Data Sources & UID Conflicts

I have a working instance of Grafana with data sources and a dashboard.

I am migrating to Docker to run the Grafana instance in a container.

I copy the dashboard json and use it as part of provisioning the dashboard in the grafana container.

I provision the data sources into the grafana container and I get UIDs already exists error.

I can’t figure out the logic of why this is happening or what exactly is being compared to alert “already exists”.

My hunch is there is some limitation with reusing UIDs? A data source can’t be added unless it has a new UID created on the spot as it’s provisioned?

Bottom line…I have a dashboard and I have data sources. I want them in a container and I want to use provisioning to automate the setup I don’t want to manually recreate it all.

Have you looked through this topic?

Thanks for the reply. I think you’re saying I need to adjust the dashboard.json so the UIDs are removed leaving only the name of the data source?

Not sure I’m following exactly.

Creating the data sources and the dashboard in the same instance worked.

It seems setting UIDs is not working or misconfigured.

It is working now! Thx