latestOpenAPI 3.0.32026-08-10152216352.3 KB

eea119b4113f

VCS

Import Terraform module from GitHub repository

Imports a module to the private registry using backend-managed VCS credential resolution. The frontend sends metadata only and the backend builds the authenticated download URL.

post/api/vcs/modules/import

Request body

namestring required

Module name in registry path

providerTypestring required

Terraform provider type

versionstring required

Module version in valid semver format

vcsIdstring required

VCS integration ID

repostring required

GitHub repoFullName (owner/repo)

branchstring required

Branch name to import from

pathstring

Optional path to module directory in repository. Defaults to repository root.

Example request

{
  "name": "aws-vpc",
  "providerType": "aws",
  "version": "1.0.0",
  "vcsId": "66169dfaf49923c0aab04510",
  "repo": "infralight/infrastructure",
  "branch": "main",
  "path": "modules/github/repo"
}

Response

Module imported successfully

messagestring required

Example response

{
  "message": "Module imported successfully"
}