Resource Builder¶
The Resource Builder generates Terraform plan JSON files that Cloudrift uses for drift detection. Three input modes are available.

Modes¶
Terraform Mode¶
Run terraform plan directly from the UI.
- Upload your
.tfand.tfvarsfiles - Cloudrift runs
terraform init→terraform plan→terraform show -json - The resulting plan JSON is saved and ready for scanning
This mode requires Terraform to be available:
- Docker: Terraform 1.7.5 is pre-installed in the container
- Desktop: Install Terraform separately (
brew install terraform)
The Terraform pipeline runs asynchronously with three phases:
| Phase | Timeout | Description |
|---|---|---|
init | 10 min | Downloads providers and initializes backend |
plan | 10 min | Creates the execution plan |
show | 5 min | Converts binary plan to JSON |
You can poll the job status to see progress and phase transitions.
Manual Mode¶
Build a plan JSON structure using a form-based editor:
- Select the AWS service type
- Fill in resource attributes (name, region, settings)
- The builder generates a valid Terraform plan JSON
This is useful when you don't have Terraform files but want to define your expected infrastructure state.
Supported Services¶
| Service | Resource Types |
|---|---|
| S3 | Buckets (encryption, versioning, public access, ACLs, tags) |
| EC2 | Instances (AMI, type, subnet, security groups, tags) |
| IAM | Roles, Users, Policies, Groups (trust policies, attached policies, members, tags) |
Upload Mode¶
Upload an existing Terraform plan JSON file:
- Click the upload area or drag and drop
- The file is validated and saved
- The config is updated to point to the uploaded file
Generate plan files from the command line:
Web API Integration¶
In Docker/web mode, the Resource Builder uses these API endpoints:
| Endpoint | Method | Purpose |
|---|---|---|
/api/terraform/status | GET | Check Terraform availability |
/api/terraform/upload | POST | Upload .tf/.tfvars files |
/api/terraform/plan | POST | Start async plan job |
/api/terraform/job?id= | GET | Poll job status |
/api/files/upload | POST | Upload plan JSON |
/api/files/generate-plan | POST | Generate plan from form data |
See the Terraform Endpoints documentation for full API details.