Skip to content

Creating & Managing Blocks

In DeployClear, a Block is a bundle of Terraform configuration code (your .tf files) attached to a "Manifest." A Block represents a modular piece of infrastructure you want to deploy—for example, an "S3 Bucket," an "EKS Cluster," or an "RDS Database."

Anatomy of a Block

Every Block consists of exactly two parts:

  1. The Terraform Source (main.tf, variables.tf, etc.)
  2. The Manifest (manifest.yaml)

The Manifest File

The manifest is a YAML file used by DeployClear to generate the user interface dynamically. When a user requests to deploy a block, DeployClear parses the manifest to build the input form they use to submit variables.

yaml
name: AWS S3 Bucket
description: Provisions a secure, private S3 bucket with versioning.
variables:
  bucket_name:
    type: string
    description: Global unique name for the S3 bucket.
    required: true
  enable_versioning:
    type: boolean
    description: Should versioning be enabled?
    default: true
  environment:
    type: select
    description: The deployment tier.
    options:
      - production
      - staging
      - development

When this Block is used, DeployClear creates a slick HTML form wrapping those specific input types, removing the need for DevOps engineers to manually pass CLI flags like -var="bucket_name=foo".

Block Sources

DeployClear supports two ways to define Blocks: Internal and GitHub Synced.

1. Internal Blocks (Inline Editor)

Internal Blocks are written directly in the DeployClear dashboard. This is excellent for prototyping or small, fast-moving teams.

  1. Navigate to Blocks using the left sidebar.
  2. Click the New Block button.
  3. Use the integrated Monaco code editor to draft your main.tf and manifest.yaml right in the browser.
  4. Click Create to save. The Block is now ready for deployment.

2. GitHub Managed Blocks (GitOps)

For enterprise teams, keeping infrastructure configuration inside the dashboard isn't viable. DeployClear heavily embraces GitOps. You can connect a GitHub repository full of Blocks, and DeployClear will automatically sync them into the dashboard.

  1. First, navigate to Integrations and ensure your GitHub App is installed.
  2. Next, go to Administration > GitHub Sync Configuration.
  3. Select your connected repository.
  4. Define the Glob Pattern identifying your blocks.
    • Example: If your repo structure is blocks/aws-s3/..., set your pattern to blocks/*.

Once configured, any commit to the main branch of that repository automatically triggers a webhook. DeployClear reads the repo, processes the directories matching your glob pattern, reads the manifest.yaml inside each directory, and creates or updates the Block in the dashboard instantly.

Next: Creating Deployment Requests →

Released under the MIT License.