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:
- If working with a VCS based repo, clone or pull the repo locally.
- Download the binary for linux_amd64 for the version you require, e,g,
terraform-provider-name_1.0.0_linux_amd64.tar.gz
- Copy terraform-provider-scalr to
{workspace}/terraform.d/plugins/terraform-provider-name
- 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.