port integration - hyperfocus/porc GitHub Wiki
This document describes how the Port developer portal integrates with the PORC orchestrator to provide infrastructure visibility, blueprint cataloging, and run-time status tracking.
Port maintains a list of available blueprints defined and approved by the platform team.
-
Entity kind:
blueprint_template
- Synced from GitHub or internal registry
- Represents a reusable Terraform module with metadata
{
"identifier": "gke-cluster-1-0-0",
"title": "GKE Cluster Blueprint v1.0.0",
"properties": {
"module_path": "gke-cluster/1.0.0",
"repo_url": "https://github.com/hyperfocus/infra-modules/gke-cluster",
"inputs_required": ["region", "project_id"],
"owner": "cloud-platform",
"status": "active"
}
}
Every time a blueprint is rendered, planned, or applied by PORC, a blueprint_instance entity is created or updated in Port.
-
Entity kind:
blueprint_instance
- Linked to blueprint_template
- Updated by PORC during
submit
,plan
,apply
{
"identifier": "gke-dev-west",
"title": "GKE Dev Cluster (West)",
"properties": {
"workspace_id": "ws-abc123",
"terraform_status": "applied",
"run_id": "run-456def",
"blueprint": "gke-cluster-1-0-0",
"region": "us-west1",
"repo_url": "https://github.com/hyperfocus/porc-blueprints/gke",
"tfe_link": "https://tfe.td.com/app/td-platform/workspaces/ws-abc123/runs/run-456def"
}
}
PORC Event | Port Update |
---|---|
pine submit |
Create or update blueprint_instance
|
pine build |
Update metadata (inputs, region, repo) |
pine plan |
Set terraform_status = planned
|
pine apply |
Set terraform_status = applied
|
To create or update an entity:
POST /v1/entities
Authorization: Bearer <PORT_API_TOKEN>
Content-Type: application/json
To update status:
{
"identifier": "gke-dev-west",
"properties": {
"terraform_status": "applied",
"run_id": "run-789ghi"
}
}
Port supports actions like "Re-run plan", "Apply now" — these can trigger PORC endpoints, e.g.:
POST /runs/{run_id}/apply
Authorization: Bearer <token>
Use this to expose PORC-triggered workflows in the Port UI while keeping source of truth in PORC.
- PORC remains the executor and validator
- Port is the live registry for both blueprint definitions and deployed infra
- No blueprint creation flows through Port
- Status is passively updated via API by PORC
Port/Backstage should consume data via:
-
GET /run/{run_id}/summary
— structured metadata for display -
GET /run/{run_id}/status
— optional polling