A best practice in Scalr is to use the Scalr Terraform provider to manage Scalr itself. You can use the Scalr provider configuration to make this easier by treating the Scalr credentials just like any others.

To do this, an API token must be generated and it is recommended to use Service Accounts for the token. This will provide you with an ID and token to be added to the configuration:

1146

Provider example:

resource "scalr_provider_configuration" "scalr" {
  name       = "scalr"
  account_id = "acc-xxxxxxxxx"
  scalr {
    hostname       = "scalr.host.example.com"
    token          = "my-scalr-token"
  }
}

The above is an example, please see the full provider documentation here.