Composable pipeline labs
Development preview. These examples are on the development branch and have not shipped with the public alpha. The controller does not require this pipeline, the HTML report, Checkov, or OPA. You can bring a different workflow as long as it speaks the execution contract.
Set up once in a disposable Kind cluster
Use the Kind quickstart first to install Argo and the controller and create the lab ServiceAccount. Use a separate cluster from any workload you want to keep. These examples manage ConfigMaps, not AWS infrastructure.
From the dev/v0.1.0-alpha.3 checkout, build and load the development runner.
Use your own Kind cluster name in KIND_CLUSTER.
KIND_CLUSTER=iacstack-quickstart
docker build --platform linux/amd64 --target runner-opentofu -t iacstack-runner-opentofu:compose-dev .
kind load docker-image iacstack-runner-opentofu:compose-dev --name "$KIND_CLUSTER"
python3 -m venv /tmp/iacstack-compose-venv
/tmp/iacstack-compose-venv/bin/python -m pip install 'PyYAML==6.0.3'
/tmp/iacstack-compose-venv/bin/python examples/composable-pipeline/render.py --out /tmp/iacstack-compose
kubectl apply -f /tmp/iacstack-compose/workflows.yaml
helm upgrade iacstack-controller oci://ghcr.io/iacstack/charts/iacstack-controller \
--namespace platform-system --version 0.1.0-alpha.2 --wait \
-f website/static/examples/quickstart/controller-config.yaml \
-f /tmp/iacstack-compose/controller-values.yaml
The last values file replaces the registered workflow list in this lab cluster
only. It keeps the existing controller release and registers the five test aliases.
To use Terraform, build/load the runner-terraform target and render with
--engine terraform --runner-image iacstack-runner-terraform:compose-dev.
Run the five recipes
Apply one of the generated manifests at a time. Watch the Argo workflow and the IaCStack status before starting the next recipe.
| Lab | File under /tmp/iacstack-compose | What to observe |
|---|---|---|
| 1. Direct | compose-direct.yaml | Validate and Plan run, then Apply creates the ConfigMap without a pause. |
| 2. Manual approval | compose-manual.yaml | Review Plan, select Approve or Reject on the Argo suspend node. Rejection does not create the ConfigMap. |
| 3. OPA | compose-opa.yaml | baseline and kind are selected in the workflow. A normal message is allowed; deny-me blocks it. |
| 4. Checkov | compose-checkov.yaml | Checkov scans the module’s HCL. The workflow applies only if the scanner passes; OPA is not called. |
| 5. Checkov + OPA | compose-combined.yaml | The scanner and policy serve different purposes. Both must permit the run to reach Apply. Try deny-me to exercise the OPA block after Checkov passes. |
kubectl apply -f /tmp/iacstack-compose/compose-direct.yaml
kubectl -n platform-system get iacstack
kubectl -n argo-workflows get workflows
kubectl -n iacstack-quickstart get configmap compose-direct \
-o jsonpath='{.data.message}'
For OPA or the combined recipe, change one input and watch a new run. The old ConfigMap value must remain unchanged when the policy denies the new plan.
kubectl -n platform-system patch iacstack compose-opa --type merge \
-p '{"spec":{"inputs":{"message":"deny-me"}}}'
For the manual recipe, approve a new run after testing rejection: patch its message to a different value, inspect the new Plan, and approve that execution. The Apply step verifies and uses the saved plan, not a new one. When done, delete the disposable cluster as in the Kind quickstart.
Add only the parts you need
- Pipeline: start from recipes.yaml. Reuse the Argo templates, copy one recipe, or swap any block. Routing and authorization glue preserve the existing execution contract.
- HTML: add
--reportto the renderer only if Argo has a private artifact repository. Plan keeps its normal log and publishesplan-reviewas an HTML artifact. For a custom pipeline, the independent command isterraform show -json tfplan | iacstack report plan --output plan.html(ortofu show). It does not send plan JSON to logs or publish it. - AWS identity: without extra roles, Plan and Apply use the identity the runner already has. An AWS variant with the AWS CLI can configure
--first-roleand optionally--second-role. Both pods authenticate independently. Do not pass session credentials as parameters or artifacts. The Kind fixture itself does not manage AWS. - OPA profiles: the workflow maintainer selects profiles; the IaCStack selects a registered alias. A profile groups Rego modules, and the engine indexes actual changes by resource type. Unrelated modules return
NotApplicable; policy errors or uncovered applicable changes stop the governed run. Shared modules are deduplicated. Error → Deny → RequireApproval → AutoApply is the decision priority. The policy bundle is immutable per generated workflow revision. - PCI and non-PCI: the sample catalog includes both as illustrative policy profiles, not compliance claims. Add a Rego module and reference it in the profile to affect only future runs of workflows using that profile. The AWS profiles are tested with plan fixtures; the runnable Kind labs use the
kindprofile. When policy is mandatory, restrict which aliases consumers may select.
Open an example HTML report . The CLI generated it from an illustrative plan; it does not provision AWS.
The saved plan and policy input stay on the per-workflow volume, not in review artifacts. Preserve access controls on both the volume and any report storage.