What is a Plugin?
A plugin is a package containing:- Terraform Module - Infrastructure-as-code that provisions cloud resources
- Manifest - Schema defining configuration properties and outputs
- Runtime Adapter (optional) - Go code that translates abstract SDK operations into cloud-specific API calls
Plugin Types
Suga uses plugins for different types of infrastructure:Resource Plugins
Map to application resources defined in projects:- Service plugins - Compute resources (Lambda, Fargate, Cloud Run)
- Bucket plugins - Object storage (S3, Cloud Storage)
- Database plugins - SQL databases (RDS, Cloud SQL, Neon)
- Entrypoint plugins - CDN and routing (CloudFront, Cloud CDN)
Identity Plugins
Provide authentication and authorization:- IAM role plugins - AWS IAM roles
- Service account plugins - GCP service accounts
- Auto-generated based on resource access patterns
Infrastructure Plugins
Provide foundational cloud resources:- VPC plugins - Network configuration
- Load balancer plugins - Traffic distribution
- Security group plugins - Firewall rules
How Platforms Use Plugins
Platforms reference plugins in their resource blueprints:Platform blueprint using plugins
suga build, the platform:
- Maps your project resources to plugin blueprints
- Resolves property values and variables
- Generates Terraform module calls
- Configures dependencies and outputs
Official Plugin Libraries
Suga maintains official plugin libraries for major cloud providers:AWS Plugin Library (suga/aws)
| Plugin | Purpose | Provisions |
|---|---|---|
lambda | Serverless compute | AWS Lambda function + ECR repository |
fargate | Container compute | ECS Fargate service + ECR + ALB target |
s3-bucket | Object storage | S3 bucket with encryption and policies |
cloudfront | CDN and routing | CloudFront distribution + WAF (optional) |
iam-role | Service identity | IAM role with policies |
vpc | Network foundation | VPC with subnets and NAT gateway |
loadbalancer | Traffic distribution | Application Load Balancer |
security-group-rule | Network security | Security group rules |
GCP Plugin Library (suga/gcp)
| Plugin | Purpose | Provisions |
|---|---|---|
cloudrun | Serverless containers | Cloud Run service + Artifact Registry |
storage-bucket | Object storage | Cloud Storage bucket with policies |
cdn | CDN and routing | Cloud Load Balancer + Cloud CDN |
service-account | Service identity | Service account with IAM bindings |
Neon Plugin Library (suga/neon)
| Plugin | Purpose | Provisions |
|---|---|---|
database | PostgreSQL database | Neon database with branch support |
Plugin Configuration
Plugins accept configuration through properties defined in their manifests:Input Properties
Configure how resources are provisioned:Lambda plugin properties
Property Types
Plugins support various property types:- Primitives -
string,number,bool - Collections -
list(string),map(string) - Objects - Complex nested structures
- References -
${var.name},${self.property},${infra.component.output}
Variable References
Properties can reference platform or blueprint variables:Using variable references
Plugin Outputs
Plugins expose outputs that other resources can reference:Lambda plugin outputs
- Identity plugins (for IAM policy generation)
- Other infrastructure components
- Platform routing configuration
Runtime Adapters
For plugins that provide SDK functionality (services, buckets), runtime adapters translate abstract operations into cloud-specific API calls.Adapter Structure
Example runtime adapter
How Adapters Work
When you use Suga’s generated SDK:Application code
- Identifies the plugin used for the
uploadsbucket - Loads the plugin’s runtime adapter
- Calls the adapter’s
Writemethod with cloud credentials - Adapter translates to cloud-specific API call (S3, Cloud Storage, etc.)
Plugin Versioning
Plugins are versioned and distributed through plugin libraries:Platform specifies plugin versions
- Suga fetches the specified plugin versions
- Generates Terraform using those plugin modules
- Ensures consistent deployments across environments
Plugin Discovery
Browse available plugins:Platform Browser
Explore official and community plugins in the platform browser
Creating Custom Plugins
Organizations can create custom plugins for:- Proprietary services - Internal APIs and systems
- Specialized configurations - Custom cloud resource setups
- Third-party integrations - SaaS services and external APIs
Plugin Development Guide
Learn how to create custom plugins for your organization
Plugin Development Workflow
- Create Terraform module - Define cloud resources
- Write manifest - Specify schema and metadata
- Add runtime adapter (optional) - Implement SDK operations
- Test locally - Use with local projects
- Publish - Share within your organization