How do I enable sensitive output uploads in private worker pools with stack dependencies ?

Last updated: September 15, 2025

Context

When working with private worker pools in Spacelift, you will need to enable sensitive output uploads to properly handle stack dependencies that have sensitive outputs . This is controlled through an environment variable that needs to be configured directly on the worker itself and not on the stack.

Answer

To enable sensitive output uploads in your private worker workers, you need to add the SPACELIFT_SENSITIVE_OUTPUT_UPLOAD_ENABLED=true environment variable

For Kubernetes

You will need to add it to the initContainer configuration in your WorkerPool specification.

Here's how to configure it:

  1. Add the environment variable to your WorkerPool configuration file:

apiVersion: workers.spacelift.io/v1beta1 kind: WorkerPool metadata: name: test-workerpool spec: poolSize: 2 token:    secretKeyRef:      name: test-workerpool      key: token      privateKey:        secretKeyRef:          name: test-workerpool          key: privateKey      Pod:      initContainer:      env:         - name: "SPACELIFT_SENSITIVE_OUTPUT_UPLOAD_ENABLED"           value: true
  1. Apply the configuration using kubectl:

kubectl apply -f your-config-file.yaml 

For EC2 workers:

Add the environment variable to your configuration section
configuration = <<EOF export SPACELIFT_SENSITIVE_OUTPUT_UPLOAD_ENABLED=true EOF

Sources: