TrademarkTrademark
Features
Documentation
All articles

Using A Custom Terraform Provider In Scalr

How to enable a custom provider, there are just a few simple steps to make this work.
Ryan FeeMarch 10, 2022
Using A Custom Terraform Provider In Scalr

This post is part of a series on Terraform State & Backends: The Complete Guide.

To use a custom provider in Scalr, there are just a few simple steps to make this work.

Prerequisites

  • The provider must have a linux_amd64 binary as that is the container type in Scalr
  • The provider must have executable permissions

How to add the provider

To use it in Scalr, the provider needs to be installed in a sub-folder of the Terraform workspace so that it will be uploaded to the remote workspace at the time of a run. For Terraform configurations in VCS repos linked to workspaces in a Scalr remote backend, the Scalr provider must be added to the VCS repo. For Terraform configurations being 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 working with a VCS based repo, clone or pull the repo locally.
  2. Download the binary for linux_amd64 for the version you require, e.g., terraform-provider-name_1.0.0_linux_amd64.tar.gz
  3. Copy terraform-provider-scalr to {workspace}/terraform.d/plugins/terraform-provider-name
  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 will be automatically uploaded to the workspace.

About the author
Ryan Feedirector 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.