For the complete documentation index, see llms.txt. This page is also available as Markdown.

List modules

List modules associated with this workspace.

get
Path parameters
orgstring · min: 1 · max: 128Required

Org is the organisation identifier.

Example: p
projectstring · min: 1 · max: 128Required

Project is the project identifier.

Example: n
identifierstring · min: 1 · max: 128Required

Identifier is the project identifier.

Example: d
Header parameters
Harness-Accountstring · min: 1 · max: 128Required

Account is the internal customer account ID.

Example: 8u
Responses
200

OK response.

application/json

Represents an individual OpenTofu or Terraform module.

invocationsinteger · int64Required

Number of times this module is invoked in the workspace

Example: 3
keystringRequired

Module key

Example: ec2-instance_test
sourcestringRequired

Module source

Example: registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete
stack_pathstringOptional

Terragrunt stack path (empty for regular Terraform workspaces)

Example: environments/prod/ec2
versionstringRequired

Module version

Example: 5.0.0
get/api/orgs/{org}/projects/{project}/workspaces/{identifier}/modules
GET /api/orgs/{org}/projects/{project}/workspaces/{identifier}/modules HTTP/1.1
Host: localhost:80
Harness-Account: 8u
Accept: */*
[
  {
    "invocations": 3,
    "key": "ec2-instance_test",
    "source": "registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete",
    "stack_path": "environments/prod/ec2",
    "version": "5.0.0"
  },
  {
    "invocations": 3,
    "key": "ec2-instance_test",
    "source": "registry.opentofu.org/terraform-aws-modules/ec2-instance/aws//examples/complete",
    "stack_path": "environments/prod/ec2",
    "version": "5.0.0"
  }
]

Last updated

Was this helpful?