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 = "8075-azbuilder-terrakube-gmnub6flawx.ws-us89b.gitpod.io/terrakube/google-network/google" 
  version = "v6.0.1" 
  # insert required variables here 
}

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 "8075-azbuilder-terrakube-gmnub6flawx.ws-us89b.gitpod.io" { 
  # 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