Manage IaCM Workspace Plugin
Understand how to customize and configure the Manage IaCM Workspace Plugin
The Manage IACM Workspace plugin provides full lifecycle management for Harness IACM workspaces. Use it in your Harness pipelines to create, update, query, or delete IACM workspaces, manage variables and secrets, and perform bulk tag refactoring, all through a single, configurable plugin step.
Important notes
Plugin image
harnesssolutionfactory/harness-manage-iacm-workspace:latestOperation modes
Set the PLUGIN_SWITCH variable to control what the plugin does.
main
register
Create or update an IACM workspace with variables and configuration
view
N/A
Query and retrieve workspace details; supports filtering by tags and attributes
remove
N/A
⚠️ Delete a workspace by identifier (destructive)
refactor
N/A
Bulk-update workspace tags and source classification
Use in Harness pipelines
Add the plugin as a Plugin step in your stage. The examples below cover each operation mode.
Create or update a workspace
Create a workspace from a template
Query workspaces by tags
Filter workspaces by attribute
Find workspaces tagged for decommission
Delete a workspace
This is a destructive, irreversible operation. Double-check PLUGIN_RESOURCE_NAME before running.
Settings reference
Connection and authentication
PLUGIN_HARNESS_ENDPOINT
String
Yes
N/A
Base URL of the Harness platform. Example: https://app.harness.io
PLUGIN_HARNESS_ACCOUNT_ID
String
Yes
N/A
Your Harness account identifier. Example: uZuUmmrnT4qQRx5XF0ZtkQ
PLUGIN_HARNESS_PORTAL_RESOURCES
String
Yes
N/A
API path to the workspace resources endpoint. Example: iacm/api/orgs/my-org/projects/my-project/workspaces
PLUGIN_HARNESS_PLATFORM_KEY
String
Yes
org.hsf_platform_api_key
Platform API key identifier used for authentication.
PLUGIN_API_KEY
String
Yes
N/A
API key for authenticating requests. Example: pat.xxxxx.xxxxx
Operation control
PLUGIN_SWITCH
String
No
main
Operation mode. One of: main, view, remove, refactor.
PLUGIN_DEBUG
Boolean
No
false
Set to true to enable verbose debug logging.
Workspace configuration
PLUGIN_RESOURCE_NAME
String
Yes
N/A
Workspace identifier. Example: my-workspace
PLUGIN_RESOURCE_OWNER
String
Yes
N/A
Team or individual that owns the workspace. Example: platform-team
PLUGIN_WORKSPACE_ORG
String
No
Harness_Platform_Management
Organization identifier within Harness.
PLUGIN_WORKSPACE_PROJECT
String
No
Solutions_Factory
Project identifier within the organization.
PLUGIN_WORKSPACE_TAGS
String (JSON)
No
{}
Key-value tags applied to the workspace. Used for filtering in view and refactor modes. Example: {"source":"official","type":"infrastructure"}
PLUGIN_WORKSPACE_TEMPLATE_IDENTIFIER
String
No
skipped
Workspace template ID. Required when provisioning from a template. Example: base-infrastructure
PLUGIN_WORKSPACE_TEMPLATE_VERSION
String
No
skipped
Version of the workspace template to use. Example: 1.0
Git repository settings
PLUGIN_GIT_REPOSITORY_BRANCH
String
Yes
main
Git branch to use for the workspace.
PLUGIN_GIT_REPOSITORY_CONNECTOR
String
Yes
org.Harness_Template_Library_Repo
Harness connector identifier for the Git repository.
PLUGIN_GIT_REPOSITORY_NAME
String
Yes
N/A
Full URL of the Git repository. Example: https://git.harness.io/account/org/repo.git
PLUGIN_GIT_REPOSITORY_PATH
String
No
N/A
Subdirectory path within the repository. Example: workspaces/my-workspace
IaC configuration
PLUGIN_IAC_PROVISIONER_TYPE
String
No
opentofu
IaC provisioner to use. Accepted values: opentofu, terraform.
PLUGIN_IAC_PROVISIONER_VERSION
String
No
1.8.0
Version of the provisioner. Example: 1.10.0
PLUGIN_IAC_PROVIDER_CONNECTOR
String
No
""
Harness connector for the IaC provider. Example: org.hsf_solutions_factory_connector
Variable management
PLUGIN_RESOURCE_VARS
String (JSON)
No
{}
Terraform input variables passed to the workspace. Example: {"key":"value","env":"prod"}
PLUGIN_RESOURCE_VARS_SECRETS
String (JSON)
No
{}
Terraform variables sourced from Harness secrets. Example: {"api_key":"secret_value"}
PLUGIN_RESOURCE_VARS_FILES
String (JSON Array)
No
[]
List of variable files to include. Example: ["terraform.tfvars","prod.tfvars"]
PLUGIN_RESOURCE_VARS_ENVS
String (JSON)
No
{}
Environment variables passed to the provisioner. Example: {"LOG_LEVEL":"info"}
PLUGIN_RESOURCE_VARS_ENVS_SECRETS
String (JSON)
No
{}
Environment variables sourced from Harness secrets. Example: {"API_SECRET":"secret"}
PLUGIN_OVERRIDES
String (JSON)
No
{}
Environment-specific variable overrides. Example: {"prod":{"key":"terraform_key"}}
PLUGIN_SHOULD_OVERWRITE_VARIABLES
Boolean
No
false
When true, replaces all existing variables. When false, merges with existing values.
Advanced settings
PLUGIN_INCLUDE_HARNESS_ENVS
Boolean
No
false
When true, injects standard Harness environment variables into the workspace.
PLUGIN_IS_EPHEMERAL
Boolean
No
false
When true, marks the workspace as ephemeral (short-lived, for temporary environments).
Filtering and query options (view mode)
PLUGIN_FILTER_KEY
String
No
N/A
Workspace attribute to filter by. Example: identifier, repository_connector
PLUGIN_FILTER_VALUE
String
No
N/A
Value to match against the filter key. Example: my-workspace
PLUGIN_RETURN_KEY
String
No
N/A
Workspace attribute to return in query results. Example: identifier
PLUGIN_IGNORE_HSF_SYSTEM
Boolean
No
false
When true, excludes internal HSF system workspaces from results.
Local development
Docker examples
The plugin can be run directly with Docker for local testing.
Create or update a workspace:
Query workspaces by tags:
Delete a workspace:
Last updated
Was this helpful?