VCS (Gitops) Driven Workspace

In this tutorial, we are going through step by step how to set up Scalr with a VCS driven workflow. This means storing your Terraform configuration in a version control system, such as Git, and having Scalr automatically perform actions when new code is being pushed.

Getting Started

The requirement for a VCS driven workspace is, obviously, having access to a version control system. We will be using a free account throughout this tutorial, but you can also use other providers, such as Gitlab, Azure Devops, or Bitbucket.

Adding Github credentials to Scalr

Select VCS Providers in the Scalr menu:


Click on New VCS Provider button:


Enter a custom name for your new provider and make sure to copy the callback URL. You will need this URL when setting up authentication at Now, click on the Register OAuth Application button to open in a new browser tab.


If you are not already logged in to Github, please do so. You will now be greeted with the registration form. As Application name, it’s recommended to enter Scalr + the name that you gave your provider at Scalr. This way, you will easily recognize where this registration is connected to in the future. Under Homepage URL, you should enter the base URL of your Scalr installation. Please paste the Callback URL that you copied in the previous step in the field Authorization callback URL. Now click on Register application.


Now Scalr has been registered with Github. But before Scalr is able to communicate with the Github API, we need to generate an API Secret Key. Click on the button Generate a new client secret. Github will ask you to confirm your password.


Copy and paste the Client ID and the Client Secret to Scalr. Click on Create.

../_images/vcs_github_secret.png ../_images/vcs_form_filled.png

Github will now ask you for permission to authorize Scalr to access Github API on your behalf. Click Authorize.


Registration is now complete and we can see that the new provider has been added in Scalr.


Create Workspace

Now when we have registered our VCS with Scalr, we are ready to create a VCS Workspace. Click on Workspaces in the Scalr menu.


Click on New Workspace


Give your workspace a name and make sure to select VCS provider as your configuration source. Now pick the VCS provider that we created in previous steps and select a repository that you want to be connected to your workspace. Click on Create.

If you don’t have any repository yet, please follow this guide on


Done! Now your workspace is configured and ready to rock!


Test Run

Final step is to do a test-push to your repository to make sure Scalr actually picks it up. Go to your new repository on, click on the Add file dropdown and pick Create new file.


Name the file and type the following as file contents:

output "hello_world" {
      value = "Hello, World!"

Click on Commit new file.


When going back to Scalr, you should now see that Scalr picked up the new changes and entered into a Planning state.

If you are interested in a bit more advanced setup with separate development and production workspaces with VCS integration, please watch this video: