# Apply to your cf-deployment based Cloud Foundry

# UAA client for cf_exporter
- type: replace
  path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/cf_exporter?
  value:
    override: true
    authorized-grant-types: client_credentials,refresh_token
    authorities: cloud_controller.admin
    scope: openid,cloud_controller.admin
    secret: "((uaa_clients_cf_exporter_secret))"

- type: replace
  path: /variables/-
  value:
    name: uaa_clients_cf_exporter_secret
    type: password

# UAA client for firehose_exporter
- type: replace
  path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/firehose_exporter?
  value:
    override: true
    authorized-grant-types: client_credentials,refresh_token
    authorities: doppler.firehose
    scope: openid,doppler.firehose
    secret: "((uaa_clients_firehose_exporter_secret))"

- type: replace
  path: /variables/-
  value:
    name: uaa_clients_firehose_exporter_secret
    type: password

# Apply to your cf-deployment based Cloud Foundry

# UAA client for cf_exporter
- type: replace
  path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/cf_exporter?
  value:
    override: true
    authorized-grant-types: client_credentials,refresh_token
    authorities: cloud_controller.admin_read_only
    scope: openid,cloud_controller.admin_read_only
    secret: "((uaa_clients_cf_exporter_secret))"

- type: replace
  path: /variables/-
  value:
    name: uaa_clients_cf_exporter_secret
    type: password

# UAA client for firehose_exporter
- type: replace
  path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/firehose_exporter?
  value:
    override: true
    authorized-grant-types: client_credentials,refresh_token
    authorities: doppler.firehose
    scope: openid,doppler.firehose
    secret: "((uaa_clients_firehose_exporter_secret))"

- type: replace
  path: /variables/-
  value:
    name: uaa_clients_firehose_exporter_secret
    type: password

Make cf_exporter client read only
Make cf_exporter client read only