Apply for invite to IaCP

How do I call a private module in Scalr IaCP?

If your template calls modules then the module source has to be accessible from Scalr so it can be pulled into the workspace at run time.


module "scalr_dynamic_vpc_dns" {
  source  = "github/scalr-eap/scalr_dynamic_vpc_dns"

There are 2 ways to make this work in Scalr.

Option 1: Modules and Template in the same VCS system

In Scalr you can set up VCS provider credentials to enable Scalr to pull templates (VCS integrated workspaces, template registry).


If the module calls in your template are from the same VCS provider then Scalr will automatically pull the module using the same access token. No changes need to be made to the template.

Option 2 : Modules from other repositories

If the module source is not in the same VCS provider as the template you can use the Scalr Module Registry to pull the module.


The module registry and VCS providers can be configured at any scope and inherited by lower scopes.

  • Create a VCS Provider for the module repo

  • Register your module

  • Scalr generates an internal source reference for the module and provides the boiler plate code, including input variables so you can add the call to your template.

module "scalr_dynamic_vpc_dns" {
  source  = ""
  version = "1.0.0"

  cidr              = var.cidr
  prefix            = var.prefix
  public            = var.public
  max_subnets       = var.max_subnets

Related documenation : Module Private Registry