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
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
}
}
}
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 2 months ago