Using Private Modules

All users in an organization with Manage Modules permission can view the Terrakube private registry and use the available providers and modules.

Using private modules

Click Registry in the main menu. And then click the module you want to use.

In the module page, select the version in the dropdown list

You can copy the code reference from the module page

For example:

module "google-network" { 
  source = "" 
  version = "v6.0.1" 
  # insert required variables here 


If your repository has submodules, Terrakube will scan the modules folder to identify all the submodules. Then, you will see a dropdown list with the submodules in the UI.

To view the readme file, inputs, outputs, resources and other information for any submodule, you can choose the submodule you want.

You can also copy the details of how to configure any submodule, just like the main module. Example:

module "iam" { 
  source = "" 
  version = "v5.30.0" 
  # insert required variables here 

In the submodule view you can switch to the differents submodules.

Or you can back to the main module with the Back button on the top of the page.

Configure Authentication

When running Terraform on the CLI, you must configure credentials in .terraformrc or terraform.rc to access the private modules.

For example:

credentials "" { 
  # valid user API token:
  token = "xxxxxx.yyyyyy.zzzzzzzzzzzzz"

To get the API token you can check API Tokens.

As an alternative you can run the terraform login command to obtain and save an user API token.

terraform login [terrakube hostname]

Last updated