Auto Provision Prometheus Datasource failing with direct access

I am trying to setup a provisioned prometheus datasource via the following yaml.

apiVersion: 1

- name: prometheus
  type: prometheus
  access: direct
  orgId: 1
  url: http://prometheus:9090
  isDefault: true
  version: 1
  editable: true

It sets it up fine but when I go to the UI the access mode is always set to Browser.

We are trying to automate grafana deployments where the enduser doesn’t have access to prometheus but the grafana server would. If I edit it and change it to direct/server then it works fine.

This is the docker image BTW running FROM grafana/grafana:5.1.2

Ahh stupid me proxy was what it needed to be set to. direct is direct from browser not direct from grafana.