Sign inSign up

harnesssolutionfactory/harness-iacm-workspace-manager

By harnesssolutionfactory

•Updated 12 days ago

This plugin provides comprehensive workspace lifecycle management for Harness IACM

Image
0

341

harnesssolutionfactory/harness-iacm-workspace-manager repository overview

⁠Harness IACM Workspace Manager - Docker Repository Overview

⁠Description

Production-grade Python Docker image for Harness IACM Workspace Manager — comprehensive workspace lifecycle management for Infrastructure as Code Management. Enables automation of workspace provisioning, querying, updates, and bulk operations through flexible CLI integration with Harness CI/CD pipelines.


⁠Quick Start

# Pull the latest image
docker pull harnesssolutionfactory/harness-manage-iacm-workspace:latest

# Create or update a workspace
docker run --rm \
  -e PLUGIN_HARNESS_ACCOUNT_ID=your_account_id \
  -e PLUGIN_API_KEY=your_api_key \
  -e PLUGIN_SWITCH=main \
  -e PLUGIN_RESOURCE_NAME=my-workspace \
  -e PLUGIN_RESOURCE_OWNER=platform-team \
  harnesssolutionfactory/harness-manage-iacm-workspace:latest

# Query workspaces by tags
docker run --rm \
  -e PLUGIN_HARNESS_ACCOUNT_ID=your_account_id \
  -e PLUGIN_API_KEY=your_api_key \
  -e PLUGIN_SWITCH=view \
  -e PLUGIN_WORKSPACE_TAGS='{"source":"official","type":"infrastructure"}' \
  harnesssolutionfactory/harness-manage-iacm-workspace:latest

⁠What's Included

  • Python 3.13 runtime with Alpine base
  • Harness IACM Workspace Manager — workspace lifecycle automation
  • Pre-installed dependencies:
    • harness-platform-sdk (Harness API client)
    • httpx (async-capable HTTP client)
    • Pydantic v2 (data validation)
    • PyYAML (configuration parsing)
    • tenacity (retry orchestration)
  • Virtual environment (/opt/venv) — no package conflicts
  • SSL X.509 strict mode — enterprise security
  • Mise task runner — comprehensive development tooling

⁠Supported Operations

The plugin provides flexible workspace management:

  • main — Create or update IACM workspaces with variables, secrets, and Git configuration
  • view — Query and retrieve workspace details with filtering by tags and attributes
  • remove — Delete workspaces by identifier (destructive operation)
  • refactor — Bulk update workspace tags and source classification
  • migrate — Copy workspace to new location with optional state migration
  • create_state — Upload terraform state file for a workspace
  • migrate_state — Move state file between workspaces

⁠Key Features

  • ✅ Multi-Operation Modes — Create, query, update, migrate, and delete workspaces
  • ✅ Flexible Configuration — Support for templates, custom variables, and provider connectors
  • ✅ Bulk Operations — Refactor and migrate multiple workspaces efficiently
  • ✅ Tag-Based Filtering — Query workspaces by custom tags and attributes
  • ✅ Multi-Provider Support — AWS, GCP, Azure, Kubernetes connectors
  • ✅ State Management — Upload, migrate, and manage Terraform state files
  • ✅ Automatic Retry — Built-in retry on rate limits with exponential backoff
  • ✅ Type Safety — Full Pydantic v2 validation

⁠Usage Example

⁠Create or Update Workspace
- step:
    type: Plugin
    name: Provision IACM Workspace
    identifier: provision_workspace
    spec:
        connectorRef: <+input>
        image: harnesssolutionfactory/harness-manage-iacm-workspace:latest
        settings:
            PLUGIN_HARNESS_ACCOUNT_ID: <+account.identifier>
            PLUGIN_API_KEY: <+secrets.getValue("harness_api_key")>
            PLUGIN_SWITCH: main
            PLUGIN_RESOURCE_NAME: my-workspace
            PLUGIN_RESOURCE_OWNER: platform-team
            PLUGIN_WORKSPACE_ORG: my-organization
            PLUGIN_WORKSPACE_PROJECT: my-project
            PLUGIN_GIT_REPOSITORY_BRANCH: main
            PLUGIN_GIT_REPOSITORY_CONNECTOR: org.harness_template_repo
            PLUGIN_GIT_REPOSITORY_NAME: https://git.harness.io/account/org/repo.git
            PLUGIN_HARNESS_PORTAL_RESOURCES: iacm/api/orgs/my-org/projects/my-project/workspaces
            PLUGIN_IAC_PROVISIONER_TYPE: opentofu
            PLUGIN_IAC_PROVISIONER_VERSION: "1.10.0"
            PLUGIN_RESOURCE_VARS: '{"environment":"production"}'
            PLUGIN_WORKSPACE_TAGS: '{"source":"official","type":"infrastructure"}'
⁠Query Workspaces by Tags
docker run --rm \
  -e PLUGIN_HARNESS_ACCOUNT_ID=your_account_id \
  -e PLUGIN_API_KEY=your_api_key \
  -e PLUGIN_SWITCH=view \
  -e PLUGIN_WORKSPACE_TAGS='{"source":"official","type":"infrastructure"}' \
  -e PLUGIN_RETURN_KEY=identifier \
  harnesssolutionfactory/harness-manage-iacm-workspace:latest
⁠Migrate Workspace
- step:
    type: Plugin
    name: Migrate Workspace
    identifier: migrate_workspace
    spec:
        connectorRef: <+input>
        image: harnesssolutionfactory/harness-manage-iacm-workspace:latest
        settings:
            PLUGIN_HARNESS_ACCOUNT_ID: <+account.identifier>
            PLUGIN_API_KEY: <+secrets.getValue("harness_api_key")>
            PLUGIN_SWITCH: migrate
            PLUGIN_RESOURCE_NAME: source-workspace
            PLUGIN_WORKSPACE_ORG: source-org
            PLUGIN_WORKSPACE_PROJECT: source-project
            PLUGIN_TARGET_WORKSPACE_ID: target-workspace
            PLUGIN_TARGET_WORKSPACE_ORG: target-org
            PLUGIN_TARGET_WORKSPACE_PROJECT: target-project
            PLUGIN_MIGRATE_STATE: "true"

⁠Configuration

⁠Core Authentication
  • PLUGIN_HARNESS_ACCOUNT_ID — Harness account identifier
  • PLUGIN_API_KEY — API key for authentication
  • PLUGIN_HARNESS_URI — Platform endpoint (default: https://app.harness.io)
⁠Operation Control
  • PLUGIN_SWITCH — Operation mode: main, view, remove, refactor, migrate, create_state, migrate_state
  • PLUGIN_DEBUG_MODE — Enable debug logging (default: false)
  • SSL_VERIFY_X509_STRICT — Enforce strict SSL validation (default: true)
⁠Workspace Configuration
  • PLUGIN_WORKSPACE_ID — Workspace identifier
  • PLUGIN_RESOURCE_OWNER — Workspace owner
  • PLUGIN_RESOURCE_DESCRIPTION — Workspace description
  • PLUGIN_WORKSPACE_ORG — Organization identifier
  • PLUGIN_WORKSPACE_PROJECT — Project identifier
  • PLUGIN_WORKSPACE_TAGS — Workspace tags (JSON)
  • PLUGIN_WORKSPACE_TEMPLATE_IDENTIFIER — Template ID
  • PLUGIN_WORKSPACE_TEMPLATE_VERSION — Template version
  • PLUGIN_IS_EPHEMERAL — Mark as ephemeral (default: false)
⁠Git Repository Settings
  • PLUGIN_GIT_REPOSITORY_BRANCH — Git branch, tag, or commit SHA
  • PLUGIN_GIT_REPOSITORY_SOURCE_TYPE — Git source type: branch, tag, sha
  • PLUGIN_GIT_REPOSITORY_CONNECTOR — Git connector identifier
  • PLUGIN_GIT_REPOSITORY_NAME — Git repository URL
  • PLUGIN_GIT_REPOSITORY_PATH — Path within repository
⁠IaC Configuration
  • PLUGIN_IAC_PROVISIONER_TYPE — Provisioner: opentofu or terraform
  • PLUGIN_IAC_PROVISIONER_VERSION — Provisioner version
  • PLUGIN_IAC_PROVIDER_CONNECTORS — Multiple provider connectors (JSON array)
⁠Variable Management
  • PLUGIN_RESOURCE_VARS — Terraform variables (JSON)
  • PLUGIN_RESOURCE_VARS_SECRETS — Secret variables (JSON)
  • PLUGIN_RESOURCE_VARS_FILES — Variable files list
  • PLUGIN_RESOURCE_VARS_ENVS — Environment variables (JSON)
  • PLUGIN_SHOULD_OVERWRITE_VARIABLES — Replace vs merge (default: false)
⁠Filtering & Query Options (view mode)
  • PLUGIN_FILTER_KEY — Attribute to filter by (e.g., identifier, repository_connector)
  • PLUGIN_FILTER_VALUE — Value to match filter
  • PLUGIN_RETURN_KEY — Field to return from results
  • PLUGIN_IGNORE_HSF_SYSTEM — Exclude HSF system workspaces (default: false)

⁠Security

  • Non-root user (UID 1000) by default
  • SSL X.509 strict mode enabled (SSL_VERIFY_X509_STRICT=true)
  • MIT licensed — See License for terms
  • Built with minimal attack surface — Alpine Linux base
  • Enterprise-grade retry logic — Rate limit handling with exponential backoff

⁠Python Version

  • Minimum: Python 3.11
  • Deployed: Python 3.13+
  • Tested: Python 3.11, 3.12, 3.13
  • Recommended: Python 3.13+


⁠Versioning

Image tags follow harness-manage-iacm-workspace:<version>, corresponding to releases. Each image is tagged with:

  • Version (e.g., 2.0.0)
  • Git SHA (e.g., sha-a1b2c3d)
  • latest (current stable)

⁠Support

For issues, documentation, or questions:


  • Maintained by: Harness
  • License: BUSL-1.1
  • Last Updated: 2026-10-02

Tag summary

Content type

Image

Digest

sha256:189babadb…

Size

40.7 MB

Last updated

12 days ago

docker pull harnesssolutionfactory/harness-iacm-workspace-manager