Azure
Create the Credential
For Azure, a service principal is required which can be created by following the steps in the provider documentation.
- Azurerm Creating a Service Principal
- In the "Add Credentials" dialogue select Azure
- Enter the Client ID (appId), Secret Key (password) and Tenant ID
(tenant) from the output ofcreate-for-rbac
. Click Save
Example output from create-for-rbac
{
"appId": "c5f583b2-xxxx-xxxx-xxxx-baa93d369f1b",
"displayName": "azure-cli-2020-04-21-07-39-09",
"name": "http://azure-cli-2020-04-21-07-39-09",
"password": "2458ffd6-xxxx-xxxx-xxxx-3b9f3964ab67",
"tenant": "8ad9e98e-xxxx-xxxx-xxxx-7969b23753d4"
}
Create the Provider Configuration
Paste the values directly into the UI as seen below:

Example in the Scalr provider:
resource "scalr_provider_configuration" "azurerm" {
name = "azurerm"
account_id = "acc-xxxxxxxxx"
azurerm {
client_id = "my-client-id"
client_secret = "my-client-secret"
subscription_id = "my-subscription-id"
tenant_id = "my-tenant-id"
}
}
The above is an example, please see the full provider documentation here .
The provider configuration will auto populate the majority of the information in the Azure provider block, but you will continue to have to add the
features {}
block even if it is empty. Scalr does not add this to ensure any existing configuration does not break.
Updated 6 months ago