Deployment Requests
In DeployClear, you never run terraform apply directly. You create a Deployment Request. This enforces that every change goes through a formal plan-then-apply cycle with human oversight.
Anatomy of a Request
A Request is a bundled definition of:
- The Block: The Terraform code to run.
- The Variables: The user-provided inputs to satisfy the Block's Manifest.
- The Jobs: The ephemeral runner executions handling the workload.
1. Creating a Request
Any user, including those with the Read-Only Member role, can create a deployment request.
- Navigate to the Blocks page.
- Select the Block you want to deploy.
- Click the Deploy button.
- An auto-generated form will appear based on the Block's
manifest.yaml. Fill out the required variables (e.g.,bucket_name=production-assets). - Click Submit Request.
2. The Planning Phase
Upon submission, DeployClear immediately spins up an ephemeral Cloudflare Container and executes the following sequence:
- Injects configured Secrets.
- Dynamically generates a
backend-admin.tfto configure your State Server. - Retrieves the specific version of the Block you requested.
- Executes
terraform init. - Executes
terraform plan -var="bucket_name=production-assets".
This entire sequence is recorded as the Plan Job. The output of the terraform plan is securely stored and presented in the dashboard.
3. The Approval Phase
Once the Plan Job succeeds, the Request enters a Pending Approval state.
This is the critical gatekeeping moment in DeployClear. A user with the DevOps, Admin, or Owner role must review the exact Plan output.
- If the plan attempts to destroy critical infrastructure, the DevOps engineer can click Reject. The Request is permanently closed.
- If the plan is safe, the DevOps engineer clicks Approve and Deploy.
4. The Apply Phase
When Approved, a brand new ephemeral runner spins up, executing terraform apply utilizing the exact variables from the request, completely insulated from local state drift.
Destroying Infrastructure
When a Block's purpose is fulfilled, it must be cleanly destroyed. The process mirrors deployment exactly:
- From the Requests page, locate a deployed Request.
- Click Destroy.
- DeployClear generates a
terraform plan -destroyjob. - A DevOps engineer reviews the destruction plan and clicks Approve and Destroy to execute the
terraform destroycommand.