Grafana cloudwatch datasource provisioning not working

Hey everyone,

I’m having difficulties using provisioning configuration to setup cloudwatch datasources. The datasources I configure are added, but they do not seem to be respecting the jsonData I specify. For example, I have:

    - name: 'cw-data-prod'
      type: 'cloudwatch'
      editable: true
      jsonData:
        authType: 'arn'
        assumeRoleArn: 'arn:aws:iam::<aws account>:role/test-grafana'
        defaultRegion: 'us-east-1'

When I start grafana, I am able to use this datasource, but no data appears. In the datasource UI, this datasource is present but the “details” section does not include the configuration I listed in the provisioning file, as you can see in the attached image

Since the datasource is editable, I am able to fill in that information again in the UI, and when I do that and save, it works and my data is present. Any help here would be much appreciated.

It works as expected for me. I’m using Grafana 6.0-pre (master), please make sure that you’re using the correct apiVersion and that you get the spaces right (this should be valid yaml). This config works for me:

apiVersion: 1

datasources:
  - name: 'cw-data-prod'
    type: 'cloudwatch'
    editable: true
    jsonData:
      authType: 'arn'
      assumeRoleArn: 'arn:aws:iam::<aws account>:role/test-grafana'
      defaultRegion: 'us-east-1'

I wasn’t defining the apiVersion, doing that resolves this issue! Thanks!!!