Dashboard json alert validation error

Hello,

I am importing dashboards using ansible (I think it’s just an api call in the background). I am setting datasource as a template variable (to support more than one prometheus datasource).

But now I am getting an error

"msg": "error : Unable to create the new dashboard _Q6RuHYIWk : 422 - {'status': 422, 'date': 'Wed, 05 Feb 2020 12:49:31 GMT', 'content-length': '135', 'body': '{\"message\":\"Alert validation error: Data source used by alert rule not found, alertName=region health alert, datasource=$PrometheusDS\"}', 'url': 'http://{{grafana}}:3000/api/dashboards/db', 'content-type': 'application/json', 'connection': 'close', 'msg': 'HTTP Error 422: Unprocessable Entity'}."}

I am not sure how can I deal with it ?
Does it mean that the alert’s datasource cannot be a variable ? If so, how can I support multiple prometheus datasource for this case ?

Thanks,
Karan