Custom Resources Setup
This guide walks you through setting up Custom Resources in Torque, from defining resource types to creating resource instances that can be reserved by blueprints.
Prerequisites
- Administrator access to Torque
- Understanding of your infrastructure resource requirements
- Basic knowledge of YAML syntax for blueprint integration
Define Resource Types
Before creating resource instances, you need to define the resource types that will be available in your inventory.
Creating a Resource Type
- Navigate to the Admin section in Torque
- Go to Custom Resources > Resource Types
- Click Create Resource Type
- Fill in the resource type details:
Basic Information:
- Name: Unique identifier for the resource type (e.g., "Ignite_Pod", "Test_Server", "Database_Instance")
- Description: Brief description of what this resource type represents
- Category: Logical grouping (e.g., "Compute", "Storage", "Network")
Attributes: Define the attributes that resources of this type will have:
- Attribute Name: The key identifier (e.g., "cpu_cores", "memory_gb", "location")
- Attribute Type: Data type (string, number, boolean)
- Required: Whether this attribute must be specified for all resource instances
- Description: What this attribute represents
Example Resource Type Configuration

Create Resource Instances
After defining resource types, create concrete instances that can be reserved by environments.
Adding Resource Instances
- Go to Custom Resources > Resource Inventory
- Click Add Resource
- Select the Resource Type from the dropdown
- Fill in the resource details:
Basic Information:
- Resource ID: Unique identifier for this specific resource
- Name: Human-readable name
- Status: Available, Reserved, Maintenance, etc.
Attribute Values: Provide values for all required attributes defined in the resource type.
Example Resource Instance

Blueprint Integration
Once resources are set up, they can be used in blueprints.
Basic Blueprint Configuration
Add a resources
section to your blueprint YAML:
spec_version: 2
description: Blueprint with custom resource reservation
resources:
image:
selector:
quantity: 2
type: 'AWS Image'
attributes:
- location: 'us-west-2'
Resource Access in Grains
Access reserved resource data in your grains:
grains:
deploy:
kind: shell
spec:
activities:
deploy:
commands:
- "echo Reserved resources: {{ .resources.image }}"
Validate Resource Setup
- Check Resource Availability: Ensure resource instances are marked as "Available"
- Test Blueprint Validation: Validate blueprints that use custom resources
Test Resource Reservation
- Create a test blueprint with resource requirements
- Launch an environment using the blueprint
- Verify resources are properly reserved
- Check that resource data is accessible in grains
Configuration Best Practices
Resource Type Design
- Consistent Naming: Use clear, consistent naming conventions
- Meaningful Attributes: Include attributes that are actually needed by blueprints
- Logical Grouping: Organize resource types into logical categories
Resource Instance Management
- Adequate Inventory: Maintain sufficient resource instances for demand
- Regular Maintenance: Keep resource status updated
- Monitoring: Track resource utilization and availability
Blueprint Integration
- Input Validation: Use appropriate input types for resource selection
- Error Handling: Include proper error handling for resource access
- Documentation: Document resource requirements clearly
Troubleshooting
Common Issues
Resource Type Not Found
- Verify the resource type name matches exactly
- Check that the resource type is enabled for the space
- Ensure proper permissions are configured
Resource Reservation Failed
- Check that sufficient resources are available
- Verify resource status is "Available"
- Review quantity requirements vs. available instances
Resource Data Not Accessible
- Confirm resource reservation was successful
- Check liquid expression syntax
- Verify attribute names match resource type definition
Monitoring Resource Usage
- Resource Dashboard: Monitor resource utilization and availability
- Reservation History: Track which environments reserved which resources
- Capacity Planning: Analyze usage patterns for capacity planning
Next Steps
- Explore Use Cases - Understand practical applications