Other Providers
Don't see a provider that you use listed in Scalr? Maybe you want to use the Datadog provider to create a dashboard or the GitHub provider to create a new repo. This is where "other" providers come into play. The other providers' functionality gives you the ability to use any Terraform or OpenTofu provider by adding arguments for each credential field needed by the provider.
First, add the name and provider name for the configuration. Once saved, you will be prompted to add the parameters needed for authentication:

The provider configuration will automatically be injected into the run once you enable access in the environment(s). Review the full provider configuration documents on how to link the provider configuration to an environment and workspace here.
Authenticating with OIDC
Custom provider configurations take static argument values. If the provider supports OIDC or workload identity federation (for example Vault, Snowflake, Cloudflare, or Chainguard), you don't need to store a static credential. Every run gets a short-lived, Scalr-signed OIDC token in the SCALR_OIDC_TOKEN shell variable, and you can pass that token to the provider. See OIDC connect for the token claims, how to set the audience, and examples.
Scalr Provider Example
Here is an example using the Scalr provider to manage a Kubernetes provider configuration:
resource "scalr_provider_configuration" "kubernetes" {
name = "k8s"
account_id = "acc-xxxxxxxxx"
custom {
provider_name = "kubernetes"
argument {
name = "host"
value = "my-host"
description = "The hostname (in form of URI) of the Kubernetes API."
}
argument {
name = "username"
value = "my-username"
}
argument {
name = "password"
value = "my-password"
sensitive = true
}
}
}In some cases, such as a list of strings, the hcl flag should be set for arguments. For example:
argument {
name = "exec.args"
value = jsonencode(["eks", "get-token", "--cluster-name", "eks-test-cluster"])
hcl = true
}
The above is an example. Follow the full provider documentation here.
Nested Parameters
Providers that require nested parameters are supported in the Scalr API/Provider right now, the UI component will come soon.
resource "scalr_provider_configuration" "github" {
name = "custom-github"
custom {
provider_name = "github"
argument {
name = "app_auth.id"
value = var.app_id
}
argument {
name = "app_auth.installation_id"
value = var.app_installation_id
}
argument {
name = "app_auth[0].pem_file"
value = app_pem_file
}
}
}Updated 8 days ago
