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

IDP Resource Manager Plugin

Understand how to customize and configure the IDP Resource Manager Plugin

The Harness IDP Resource Manager plugin provides full lifecycle management for Harness Internal Developer Portal (IDP) entities. Use it in your Harness pipelines to register, update, query, and remove IDP entities such as workflows, resources, systems, and components. The plugin also supports backwards compatibility with IDP 1.0-style configurations via Git sync.

Important notes

  • The plugin requires Python 3.11+ and Docker with buildx support at runtime.

  • The remove operation is destructive and irreversible. Always verify PLUGIN_SCOPES before running.

  • The view mode requires IDP 2.0. It is not supported on IDP 1.0 accounts.

  • PLUGIN_PROJECT_ID requires PLUGIN_ORG_ID to be set. Project-scoped operations without an org will fail.

  • PLUGIN_HARNESS_URL is deprecated. Use PLUGIN_HARNESS_URI for all new configurations.

Plugin image

harnesssolutionfactory/harness-idp-resource-manager:latest

Operation modes

Set PLUGIN_SWITCH to control what the plugin does. If not set, the plugin defaults to main.

Mode
Description

main / register

Register or upsert IDP entities from a registration file or filter template

register_multi

Register multiple resources using a shared payload template with substitution

view

List all entities of a specified type. Requires IDP 2.0

check

Verify IDP 2.0 compatibility and resource existence at a given scope

property

Update a custom metadata property on an existing entity

remove

⚠️ Delete all entities at the specified scope(s). Destructive operation

children

Register child entities from a parent template directory

legacy

Register entities using IDP 1.0-style Git sync

Supported entity types

Set PLUGIN_ENTITY_TYPE to target a specific kind of IDP catalog entity. Applies to all modes except check.

Value
Description

workflow

IDP software templates / workflows

resource

Infrastructure or platform resources

system

Logical groupings of related components

component

Services, libraries, websites, or other software components

Use in Harness pipelines

Add the plugin as a Plugin step in your stage. The examples below cover each operation mode.

Go to Custom plugins to review how Harness Plugin Steps require the scripts to support environment variables with a prefix of PLUGIN_. However, when referring to these variables in the Harness pipeline plugin step, you must remove the prefix. For example, PLUGIN_HARNESS_URI becomes HARNESS_URI. This accounts for the appearance of a discrepancy between the actual environment variables and the settings on the plugin step.

Register workflows

Register workflows from the Harness Template Library using a registration file:

Register resources from a Jinja2 template

Register IDP resources by rendering a Jinja2 template with a JSON payload:

Register systems from a static entity file

Register IDP systems directly from a YAML entity file without template rendering:

Register components

Register IDP components from a static entity file:

Query entities

List all existing entities of a given type:

Check entity existence at scope

Verify IDP 2.0 compatibility and whether resources exist at a given scope:

Update a custom property

Update a dot-notation metadata property on an existing entity:

Remove entities at scope


Settings reference

Connection and authentication

Setting
Type
Required
Default
Description

PLUGIN_HARNESS_URI

String

Yes

N/A

Base URL of the Harness platform. Example: https://app.harness.io

PLUGIN_HARNESS_ACCT

String

Yes

N/A

Your Harness account identifier. Example: HT1234569XFhhslllddd12

PLUGIN_HARNESS_API_KEY

String

Yes

N/A

API token with permissions to manage IDP entities. Example: pat.xxxxx

PLUGIN_HARNESS_URL

String

No

N/A

Deprecated. Alternative variable for the Harness API URL. Use PLUGIN_HARNESS_URI instead.

Operation control

Setting
Type
Required
Default
Description

PLUGIN_SWITCH

String

No

main

Operation mode. Go to Operation modes for accepted values.

PLUGIN_ENTITY_TYPE

String

No

workflow

Type of IDP entity to manage. Accepted values: workflow, resource, system, component. Not used in check mode.

PLUGIN_DEBUG_MODE

String

No

false

Set to true to enable verbose debug logging.

Scope and organization

Setting
Type
Required
Default
Description

PLUGIN_ORG_ID

String

No

Account scope

Organization identifier. If omitted, operations default to account scope.

PLUGIN_PROJECT_ID

String

No

Account scope

Project identifier. Requires PLUGIN_ORG_ID to be set.

PLUGIN_SCOPES

String

No

N/A

Scope(s) for remove operations. Accepts comma-separated values. Format: all, account, account.ORG_ID, or account.ORG_ID.PROJ_ID. Example: account.Harness_Platform_Management

File and directory configuration

Setting
Type
Required
Default
Description

PLUGIN_WORKING_DIR

String

No

/harness/harness-template-library

Full path to the directory containing configuration or template files.

PLUGIN_REGISTRATION_FILE

String

Conditional

N/A

YAML file (relative to PLUGIN_WORKING_DIR) that lists entities to register. Required if PLUGIN_FILTER_TEMPLATE is not set. Applies to main, register, children modes. Example: idp_registration_mgr.yaml

Template and entity registration

Setting
Type
Required
Default
Description

PLUGIN_FILTER_TEMPLATE

String

Conditional

N/A

Workflow, template name, or directory name within PLUGIN_WORKING_DIR to register. Required if PLUGIN_REGISTRATION_FILE is not set. Applies to main, register, children, legacy modes. Example: sto-sast-primer

PLUGIN_FILTER_TAG

String

No

N/A

Tag filter for narrowing entity results in view mode. Example: managed_entity

PLUGIN_INCLUDE_CHILDREN

String

No

no

Set to yes to load child entities from the PLUGIN_FILTER_TEMPLATE directory. Applies to main, register, children, legacy modes.

PLUGIN_ENTITY_FILE

String

Conditional

N/A

Path to a YAML entity definition file, relative to PLUGIN_WORKING_DIR. Required for non-template registration in register mode. Example: lob/core.yaml

PLUGIN_ENTITY_TEMPLATE

String

Conditional

N/A

Path to a Jinja2 template file, relative to PLUGIN_WORKING_DIR. Required when using template rendering. Example: idp_resource_templates/default_hsf_workspace_resource.yaml.j2

PLUGIN_ENTITY_PAYLOAD

String (JSON)

Conditional

N/A

JSON object with variables for Jinja2 template injection. Required when PLUGIN_ENTITY_TEMPLATE is set. Applies to register and register_multi modes. Example: '{"resource_name":"workspace","workspace_uri":"https://..."}'

PLUGIN_USE_TEMPLATE_MGR

String

No

true

Set to true to use Jinja2 template rendering. Set to false to use static entity files.

Entity management

Setting
Type
Required
Default
Description

PLUGIN_ENTITY_ID

String

Conditional

N/A

Identifier of the entity to update or delete. Required for entity-specific operations in remove and property modes. Example: my_resource

PLUGIN_RESOURCES

String

Conditional

N/A

Comma-separated list of resource names for register_multi mode. Example: lab,lab_workshop

Custom properties

Setting
Type
Required
Default
Description

PLUGIN_HSF_PROPERTY

String

Yes (in property mode)

N/A

Dot-notation path of the metadata property to update. Example: metadata.hsf.is_drifted

PLUGIN_HSF_VALUE

String

Yes (in property mode)

N/A

Value to assign to PLUGIN_HSF_PROPERTY. Example: false

Legacy settings

Setting
Type
Required
Default
Description

PLUGIN_REPO_BRANCH

String

Yes (in legacy mode)

main

Git branch used for IDP 1.0-style Git sync registration.


Local development

Docker examples

The plugin can be run directly with Docker for local testing. Mount your local template library into the container so the plugin can locate entity files.

Register workflows:

Register resources with a Jinja2 template:

View all workflows:

Update a custom property:

Last updated

Was this helpful?