# Create module

Create a new module in the module registry

Endpoint: POST /iacm/api/modules
Version: 1.0
Security: x-api-key

## Query parameters:

  - `scope_org` (string)
    Organization identifier where the module is scoped.
    Example: "my_org"

  - `scope_project` (string)
    Project identifier where the module is scoped.
    Example: "my_project"

## Header parameters:

  - `Harness-Account` (string, required)
    Harness account ID that owns the module.
    Example: "abc123DEFghiJKL"

## Request fields (application/json):

  - `description` (string)
    Free-form text describing the purpose and usage of the module.
    Example: "Provisions a VPC with public and private subnets."

  - `git_tag_style` (string)
    Pattern used to match Git tags for module versioning. Use 'module-name-*' to match tags like 'my-vpc-module-v1.0.0'.
    Example: "module-name-*"

  - `name` (string, required)
    Human-readable name of the module. Must be unique within the same scope and system.
    Example: "my-vpc-module"

  - `onboarding_pipeline` (string)
    Identifier of the Harness pipeline used for module onboarding and metadata sync.
    Example: "Module_Onboarding_Pipeline"

  - `onboarding_pipeline_org` (string)
    Organization where the onboarding pipeline is defined. Defaults to scope_org if not provided.
    Example: "my_org"

  - `onboarding_pipeline_project` (string)
    Project where the onboarding pipeline is defined. Defaults to scope_project if not provided.
    Example: "my_project"

  - `onboarding_pipeline_sync` (boolean)
    When true, module metadata is automatically synced via the onboarding pipeline when new Git tags are pushed.
    Example: true

  - `org` (string)
    Organization identifier where the Git connector is defined. Defaults to scope_org if not provided.
    Example: "my_org"

  - `project` (string)
    Project identifier where the Git connector is defined. Defaults to scope_project if not provided.
    Example: "my_project"

  - `repository` (string)
    Name of the Git repository that contains the module source code.
    Example: "my-terraform-modules"

  - `repository_branch` (string)
    Repository Branch in which the code should be accessed.
    Example: "main"

  - `repository_commit` (string)
    Repository Commit/Tag in which the code should be accessed.
    Example: "abc10ed"

  - `repository_connector` (string)
    Harness Git connector identifier used to access the Git repository. Must reference a valid Git connector in your account. Leave empty when using Harness Code as the repository source.
    Example: "my_github_connector"

  - `repository_path` (string)
    Repository Path is the path in which the infra code resides.

  - `storage_type` (string)
    Defines how module versions are stored. 'git_reference' resolves versions from Git tags; 'artifact' stores uploaded archive files.
    Enum: "git_reference", "artifact"

  - `system` (string, required)
    Provider or system the module targets. Lowercase letters only (e.g. aws, gcp, azure, kubernetes).
    Example: "aws"

  - `tags` (string)
    Comma-separated list of tags to categorize the module (e.g. networking,vpc,aws).
    Example: "Itaque iusto."

## Response 200 fields (application/json):

  - `account` (string, required)
    Harness account ID that owns the module.
    Example: "abc123DEFghiJKL"

  - `created` (integer, required)
    Created is the unix timestamp at which the resource was originally created in milliseconds.
    Example: 2080792905188807400

  - `description` (string)
    Free-form text describing the purpose and usage of the module.
    Example: "Provisions a VPC with public and private subnets."

  - `id` (string, required)
    module id
    Example: "aaaaaaaa-bbbb-cccc-eeee-ffffffffffff"

  - `name` (string, required)
    Human-readable name of the module. Must be unique within the same scope and system.
    Example: "my-vpc-module"

  - `org` (string)
    Organization identifier where the Git connector is defined. Defaults to scope_org if not provided.
    Example: "my_org"

  - `project` (string)
    Project identifier where the Git connector is defined. Defaults to scope_project if not provided.
    Example: "my_project"

  - `repository` (string)
    Name of the Git repository that contains the module source code.
    Example: "my-terraform-modules"

  - `repository_branch` (string)
    Repository Branch in which the code should be accessed.
    Example: "main"

  - `repository_commit` (string)
    Repository Commit/Tag in which the code should be accessed.
    Example: "abc10ed"

  - `repository_connector` (string)
    Harness Git connector identifier used to access the Git repository. Must reference a valid Git connector in your account. Leave empty when using Harness Code as the repository source.
    Example: "my_github_connector"

  - `repository_path` (string)
    Repository Path is the path in which the infra code resides.

  - `scope_org` (string)
    Organization identifier where the module is scoped.
    Example: "my_org"

  - `scope_project` (string)
    Project identifier where the module is scoped.
    Example: "my_project"

  - `storage_type` (string)
    Defines how module versions are stored. 'git_reference' resolves versions from Git tags; 'artifact' stores uploaded archive files.
    Enum: "git_reference", "artifact"

  - `system` (string, required)
    Provider or system the module targets. Lowercase letters only (e.g. aws, gcp, azure, kubernetes).
    Example: "aws"

  - `tags` (string)
    Comma-separated list of tags to categorize the module (e.g. networking,vpc,aws).
    Example: "Fugit odit optio omnis aut aperiam sed."

  - `updated` (integer, required)
    Modified is the unix timestamp at which the resource was last modified in milliseconds.
    Example: 770150062524283600

## Response 400 fields (application/vnd.goa.error):

  - `fault` (boolean, required)
    Is the error a server-side fault?
    Example: true

  - `id` (string, required)
    ID is a unique identifier for this particular occurrence of the problem.
    Example: "123abc"

  - `message` (string, required)
    Message is a human-readable explanation specific to this occurrence of the problem.
    Example: "parameter 'p' must be an integer"

  - `name` (string, required)
    Name is the name of this class of errors.
    Example: "bad_request"

  - `temporary` (boolean, required)
    Is the error temporary?
    Example: true

  - `timeout` (boolean, required)
    Is the error a timeout?
    Example: true


