file:
  /opt/bitnami/grafana/data:
    filetype: directory
    exists: true
    mode: "2775"
  /opt/bitnami/grafana/data/plugins/{{ .Vars.plugins }}:
    filetype: directory
    exists: true
    mode: "2755"
command:
  grafana-cli-data-migration:
    exec: cd /opt/bitnami/grafana && grafana-cli admin data-migration encrypt-datasource-passwords
    exit-status: 0
    stdout:
      - /datasources.*already encrypted/
  check-user-info:
    exec: id
    exit-status: 0
    stdout:
    - uid={{ .Vars.containerSecurityContext.runAsUser }}
    - /groups=.*{{ .Vars.podSecurityContext.fsGroup }}/
