Apply for invite to IaCP

Cloud Credentials

This page explains how to set up Terraform provider credentials in Scalr so that they are automatically propagated to workspaces.

  • Securely store credentials in one place

  • No need to share credentials with users

  • You wont need to enter credentials every time you run a template

Many Terraform providers support the use of environment variables to pass credentials. Scalr exploits this feature to automatically propagate environment variables to workspaces from centrally configured Cloud Credentials.

Note

Not all Terraform providers support the use of environment variables for credentials. Check the documentation for the providers you are using.

You can set up “Cloud Credentials” in Scalr so that they can be used to securely publish the access_keys and other provider credentials to workspaces as environment variables.

Setting up cloud credentials directly in Scalr is a three step process.

  1. Set up necessary authentication in the cloud provider (varies from cloud to cloud).

  2. Create Cloud Credentials in Scalr by going to the account scope (green):

    ../_images/navigate_environment.png ../_images/cloud_creds_acct.png
  3. Link Cloud Credentials to the required environments:

    ../_images/link_creds.png

Environments can be linked to multiple clouds which enables DevOps to implement distributed deployments.

This screen shot shows some example variables for Azure, AWS and GCP in a workspace.

../_images/ws_provider_vars.png

With credentials set up this way your template can now use provider blocks that omit the credentials parameters as shown in this AWS example.

provider "aws" {
  region     = var.region
}

Scalr currently allows cloud credentials for the following providers. Click the links for guidance on configuring access in these clouds.

Further Reading