TrademarkTrademark
Features
Documentation
  1. Learning Center
  2. Terraform Providers: Complete Configuration and Management Guide

Article · part of a guide

Using A Custom Terraform Provider In Scalr

How to enable a custom Terraform provider in a Scalr workspace in a few steps.

Using A Custom Terraform Provider In Scalr

Using a custom provider in Scalr takes a few steps.

Prerequisites

  • The provider must have a binary matching the agent's architecture: linux_amd64, or linux_arm64 (supported on agent version 0.43.0 and later)
  • The provider must have executable permissions

How to add the provider

Scalr needs the provider installed in a sub-folder of the Terraform workspace so that it's uploaded to the remote workspace when a run starts. For Terraform configurations in VCS repos linked to workspaces in a Scalr remote backend, the custom provider must be added to the VCS repo. For Terraform configurations run via the CLI, the provider must be added to the local directory/folder where the Terraform configuration is held.

Follow these steps:

  1. If you're working with a VCS-based repo, clone or pull the repo locally.
  2. Download the binary matching your agent architecture (linux_amd64, or linux_arm64 on agent 0.43.0+) for the version you require, e.g., terraform-provider-name_1.0.0_linux_amd64.tar.gz
  3. Extract the binary and copy it to {workspace}/terraform.d/plugins/<HOSTNAME>/<NAMESPACE>/<TYPE>/<VERSION>/linux_amd64/ (or linux_arm64), matching the source you declare in required_providers
  4. For a VCS-based repo, commit and push back to the repo.

Now when you run terraform init; terraform apply, or a run is triggered by pull request automation, the plugin is uploaded to the workspace automatically.

About the author

Ryan Fee

director of platform engineering at Scalr

Ryan Fee is the director of platform engineering at Scalr, with over 15 years of experience improving infrastructure experiences at companies large and small.

Part of this guide

16 sheets

Terraform Providers: Complete Configuration and Management Guide

15 articles