diff --git a/docs/.vale/styles/config/vocabularies/Suga/accept.txt b/docs/.vale/styles/config/vocabularies/Suga/accept.txt index 23a8171c..f3794bba 100644 --- a/docs/.vale/styles/config/vocabularies/Suga/accept.txt +++ b/docs/.vale/styles/config/vocabularies/Suga/accept.txt @@ -12,6 +12,15 @@ allowlisting cdktf Presigned presigned +Fargate +subnet +subnets +GPUs +CPUs +serverless +Serverless +autoscaling +geo # Defaults from mintlify Mintlify diff --git a/docs/docs.json b/docs/docs.json index 00121779..062398ee 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -94,6 +94,54 @@ ] } ] + }, + { + "tab": "Plugins", + "icon": "plug", + "groups": [ + { + "group": "Plugin Reference", + "pages": ["plugins"] + }, + { + "group": "Providers", + "pages": [ + { + "group": "AWS", + "icon": "aws", + "pages": [ + "plugins/aws", + "plugins/aws/s3", + "plugins/aws/fargate", + "plugins/aws/lambda", + "plugins/aws/cloudfront", + "plugins/aws/loadbalancer", + "plugins/aws/vpc", + "plugins/aws/iamrole" + ] + }, + { + "group": "GCP", + "icon": "google", + "pages": [ + "plugins/gcp", + "plugins/gcp/storage", + "plugins/gcp/cloudrun", + "plugins/gcp/serviceaccount", + "plugins/gcp/cdn" + ] + }, + { + "group": "Neon", + "icon": "database", + "pages": [ + "plugins/neon", + "plugins/neon/database" + ] + } + ] + } + ] } ], "global": { diff --git a/docs/images/edit-platform.png b/docs/images/edit-platform.png new file mode 100644 index 00000000..09fc2c31 Binary files /dev/null and b/docs/images/edit-platform.png differ diff --git a/docs/plugins.mdx b/docs/plugins.mdx new file mode 100644 index 00000000..696e7d8c --- /dev/null +++ b/docs/plugins.mdx @@ -0,0 +1,42 @@ +--- +title: Introduction +description: Official plugins for creating infrastructure platforms +--- + +Each plugin provides a specific infrastructure capability - like storage, compute, or networking. Compose these plugins to build complete platforms across multiple cloud providers. + +## Official Plugins + + + + + + + +## Compose Plugins to Build your Platform + +1. **Open the Suga editor** to build your platform: + + ```bash + suga edit + ``` + +2. **Add plugins** into your platform and configure parameters using this reference + +![Platform Edit](/images/edit-platform.png) + + +Reference outputs from other plugins using `${type.name.output}` syntax, e.g. `${infra.vpc.vpc_id}` or `${databases.main.connection_string}` + + +3. **Deploy your platform**: + - Click "Commit revision" in the editor to update your platform + - Update the target in your `suga.yaml` to build terraform using your platform with the plugins that you have composed: + + ```yaml + targets: + - suga/aws@2 + ``` + + + diff --git a/docs/plugins/aws.mdx b/docs/plugins/aws.mdx new file mode 100644 index 00000000..f26c5faf --- /dev/null +++ b/docs/plugins/aws.mdx @@ -0,0 +1,53 @@ +--- +title: Overview +description: AWS plugins for compute, storage, networking, and identity management. +--- + +## Available Plugins + +### Storage + + + + Object storage for storing and retrieving data from anywhere + + + +### Services + + + + Run long-running containerized services with automatic scaling + + + Run event-driven functions that execute on demand + + + +### Entrypoints + + + + Content Delivery Network for fast, global content delivery + + + +### Infrastructure + + + + Distribute incoming traffic across multiple targets + + + Virtual Private Cloud with isolated network and subnets + + + +### Identity + + + + Identity and Access Management role for secure access to AWS services + + + diff --git a/docs/plugins/aws/cloudfront.mdx b/docs/plugins/aws/cloudfront.mdx new file mode 100644 index 00000000..138139c2 --- /dev/null +++ b/docs/plugins/aws/cloudfront.mdx @@ -0,0 +1,62 @@ +--- +title: CloudFront +description: Content Delivery Network for fast, global content delivery +--- + +## Configuration + + + Custom domain name for CloudFront distribution + + **Example:** `cdn.example.com` + + + + Indicates if the custom domain is the root domain for the purposes of hosted zone lookup and record creation + + + + Default cache policy for CloudFront distribution + + **Example:** `658327ea-f89d-4fab-a63d-7e88639e58f6` + + + + Default origin request policy + + **Example:** `b689b0a8-53d0-40ab-baf2-68738e2966ac` + + + + List of ISO 3166-1 alpha-2 country codes for geo restriction + + **Example:** `["US", "CA", "GB"]` + + + + Type of geo restriction (none, whitelist, blacklist) + + **Example:** `none` + + + + Enable rate limiting rules for DDoS protection + + **Example:** `True` + + + + Maximum requests per 5-minute period per IP + + **Example:** `2000` + + + + Enable AWS WAF for CloudFront distribution + + + + List of AWS Managed Rule Groups to enable + + **Example:** `[{"name": "AWSManagedRulesCommonRuleSet", "priority": 10, "override_action": "none"}, {"name": "AWSManagedRulesKnownBadInputsRuleSet", "priority": 20, "override_action": "none"}]` + diff --git a/docs/plugins/aws/fargate.mdx b/docs/plugins/aws/fargate.mdx new file mode 100644 index 00000000..a428e5bc --- /dev/null +++ b/docs/plugins/aws/fargate.mdx @@ -0,0 +1,60 @@ +--- +title: Fargate +description: Run long-running containerized services with automatic scaling +--- + +## Configuration + + + ARN of the Application Load Balancer + + **Example:** `arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb/50dc6c495c0c9188` + + + + Security group ID of the Application Load Balancer + + **Example:** `sg-0123456789abcdef0` + + + + Port number the container exposes + + **Example:** `8080` + + + + CPU units for the Fargate task (256, 512, 1024, etc.) + + **Example:** `256` + + + + Environment variables for the container + + **Example:** `{"NODE_ENV": "production", "LOG_LEVEL": "info"}` + + + + Memory in MB for the Fargate task + + **Example:** `512` + + + + List of security group IDs for the Fargate service + + **Example:** `["sg-0123456789abcdef0"]` + + + + List of subnet IDs for the Fargate service + + **Example:** `["subnet-12345678", "subnet-87654321"]` + + + + VPC ID where the Fargate service will run + + **Example:** `vpc-12345678` + diff --git a/docs/plugins/aws/iamrole.mdx b/docs/plugins/aws/iamrole.mdx new file mode 100644 index 00000000..e8126628 --- /dev/null +++ b/docs/plugins/aws/iamrole.mdx @@ -0,0 +1,18 @@ +--- +title: IAM Role +description: Identity and Access Management role for secure access to AWS services +--- + +## Configuration + + + List of trusted actions for the assume role policy + + **Example:** `["sts:AssumeRole"]` + + + + List of AWS services that can assume this role + + **Example:** `["lambda.amazonaws.com", "ecs-tasks.amazonaws.com"]` + diff --git a/docs/plugins/aws/lambda.mdx b/docs/plugins/aws/lambda.mdx new file mode 100644 index 00000000..533d5671 --- /dev/null +++ b/docs/plugins/aws/lambda.mdx @@ -0,0 +1,54 @@ +--- +title: Lambda +description: Run event-driven functions that execute on demand +--- + +## Configuration + + + Instruction set architecture for the Lambda function (x86_64 or arm64) + + **Example:** `x86_64` + + + + Environment variables for the Lambda function + + **Example:** `{"NODE_ENV": "production", "LOG_LEVEL": "info"}` + + + + Size of ephemeral storage in MB (512-10240) + + **Example:** `1024` + + + + Authorization type for function URL (AWS_IAM or NONE) + + **Example:** `AWS_IAM` + + + + Amount of memory in MB (128-10240) + + **Example:** `1024` + + + + List of security group IDs for VPC configuration + + **Example:** `["sg-0123456789abcdef0"]` + + + + List of subnet IDs for VPC configuration + + **Example:** `["subnet-12345678", "subnet-87654321"]` + + + + Maximum execution time in seconds (1-900) + + **Example:** `300` + diff --git a/docs/plugins/aws/loadbalancer.mdx b/docs/plugins/aws/loadbalancer.mdx new file mode 100644 index 00000000..94c8f83a --- /dev/null +++ b/docs/plugins/aws/loadbalancer.mdx @@ -0,0 +1,42 @@ +--- +title: Load Balancer +description: Distribute incoming traffic across multiple targets +--- + +## Configuration + + + Whether the load balancer is internal (true) or internet-facing (false) + + + + Type of load balancer (application, network, gateway) + + **Example:** `application` + + + + Name of the load balancer + + **Example:** `api-alb` + + + + List of security group IDs to assign to the load balancer + + **Example:** `["sg-0123456789abcdef0", "sg-0987654321fedcba0"]` + + + + List of subnet IDs to attach to the load balancer + + **Example:** `["subnet-12345678", "subnet-87654321"]` + + +## Outputs + + + The ARN of the load balancer + + **Example:** `arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-alb/50dc6c495c0c9188` + diff --git a/docs/plugins/aws/s3.mdx b/docs/plugins/aws/s3.mdx new file mode 100644 index 00000000..b7fc118b --- /dev/null +++ b/docs/plugins/aws/s3.mdx @@ -0,0 +1,12 @@ +--- +title: S3 +description: Object storage for storing and retrieving data from anywhere +--- + +## Configuration + + + Tags to apply to the S3 bucket + + **Example:** `{"Environment": "production", "Purpose": "media-storage"}` + diff --git a/docs/plugins/aws/vpc.mdx b/docs/plugins/aws/vpc.mdx new file mode 100644 index 00000000..b9745128 --- /dev/null +++ b/docs/plugins/aws/vpc.mdx @@ -0,0 +1,86 @@ +--- +title: VPC +description: Virtual Private Cloud with isolated network and subnets +--- + +## Configuration + + + List of availability zones to use for the VPC + + **Example:** `["us-west-2a", "us-west-2b", "us-west-2c"]` + + + + Egress rules for the default security group + + **Example:** `[{"from_port": "0", "to_port": "0", "protocol": "-1", "cidr_blocks": "0.0.0.0/0"}]` + + + + Ingress rules for the default security group + + **Example:** `[{"from_port": "443", "to_port": "443", "protocol": "tcp", "cidr_blocks": "10.0.0.0/16"}]` + + + + Enable NAT Gateway for private subnet internet access + + + + Enable VPN Gateway for the VPC + + + + The name of the VPC + + **Example:** `main-vpc` + + + + Network configuration including CIDR block and subnet definitions + + **Example:** `{"cidr_block": "10.0.0.0/16", "private_subnets": ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"], "public_subnets": ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]}` + + + + Use a single NAT Gateway instead of one per availability zone + + + + Tags to apply to the VPC resources + + **Example:** `{"Environment": "production", "Team": "platform"}` + + +## Outputs + + + The ID of the default security group + + **Example:** `sg-0123456789abcdef0` + + + + List of private subnet IDs + + **Example:** `["subnet-12345678", "subnet-23456789"]` + + + + List of public subnet IDs + + **Example:** `["subnet-87654321", "subnet-76543210"]` + + + + List of all subnet IDs (public and private) + + **Example:** `["subnet-12345678", "subnet-23456789", "subnet-87654321", "subnet-76543210"]` + + + + The ID of the VPC + + **Example:** `vpc-12345678` + diff --git a/docs/plugins/gcp.mdx b/docs/plugins/gcp.mdx new file mode 100644 index 00000000..05ec914f --- /dev/null +++ b/docs/plugins/gcp.mdx @@ -0,0 +1,39 @@ +--- +title: Overview +description: GCP plugins for fully managed containers, storage, and CDN services. +--- + +## Available Plugins + +### Storage + + + + Object storage for files, images, and data + + + +### Services + + + + Run stateless containers with automatic scaling from zero + + + +### Identity + + + + Service account for secure authentication and authorization in Google Cloud + + + +### Entrypoints + + + + Global Content Delivery Network for fast, reliable content delivery + + + diff --git a/docs/plugins/gcp/cdn.mdx b/docs/plugins/gcp/cdn.mdx new file mode 100644 index 00000000..2ea19474 --- /dev/null +++ b/docs/plugins/gcp/cdn.mdx @@ -0,0 +1,24 @@ +--- +title: CDN +description: Global Content Delivery Network for fast, reliable content delivery +--- + +## Configuration + + + CDN domain configuration + + **Example:** `{"domain": "cdn.example.com"}` + + + + Google Cloud Project ID + + **Example:** `my-project-123` + + + + Google Cloud region + + **Example:** `us-central1` + diff --git a/docs/plugins/gcp/cloudrun.mdx b/docs/plugins/gcp/cloudrun.mdx new file mode 100644 index 00000000..a275352e --- /dev/null +++ b/docs/plugins/gcp/cloudrun.mdx @@ -0,0 +1,68 @@ +--- +title: Cloud Run +description: Run stateless containers with automatic scaling from zero +--- + +## Configuration + + + Maximum number of concurrent requests each instance can handle + + **Example:** `80` + + + + Port number the container exposes + + **Example:** `9001` + + + + Number of CPUs to allocate to the Cloud Run service + + **Example:** `1` + + + + Environment variables for the Cloud Run service + + **Example:** `{"NODE_ENV": "production", "LOG_LEVEL": "info"}` + + + + Number of GPUs to allocate to the Cloud Run service + + + + Maximum number of instances that can be created + + **Example:** `10` + + + + Amount of memory to allocate to the Cloud Run service in MB + + **Example:** `512` + + + + Minimum number of instances to keep running + + + + Google Cloud Project ID + + **Example:** `my-project-123` + + + + Google Cloud region to deploy the service + + **Example:** `us-central1` + + + + Maximum request timeout in seconds + + **Example:** `10` + diff --git a/docs/plugins/gcp/serviceaccount.mdx b/docs/plugins/gcp/serviceaccount.mdx new file mode 100644 index 00000000..7a0fd4e5 --- /dev/null +++ b/docs/plugins/gcp/serviceaccount.mdx @@ -0,0 +1,18 @@ +--- +title: Service Account +description: Service account for secure authentication and authorization in Google Cloud +--- + +## Configuration + + + Google Cloud Project ID + + **Example:** `my-project-123` + + + + List of trusted actions for the service account + + **Example:** `["iam.serviceAccounts.actAs"]` + diff --git a/docs/plugins/gcp/storage.mdx b/docs/plugins/gcp/storage.mdx new file mode 100644 index 00000000..6a3e6b3e --- /dev/null +++ b/docs/plugins/gcp/storage.mdx @@ -0,0 +1,24 @@ +--- +title: Storage +description: Object storage for files, images, and data +--- + +## Configuration + + + Google Cloud Project ID + + **Example:** `my-project-123` + + + + Google Cloud region for the storage bucket + + **Example:** `us-central1` + + + + Storage class for the bucket (STANDARD, NEARLINE, COLDLINE, ARCHIVE) + + **Example:** `STANDARD` + diff --git a/docs/plugins/neon.mdx b/docs/plugins/neon.mdx new file mode 100644 index 00000000..6f896945 --- /dev/null +++ b/docs/plugins/neon.mdx @@ -0,0 +1,15 @@ +--- +title: Overview +description: serverless PostgreSQL with instant branching, auto scaling, and built‑in connection pooling. +--- + +## Available Plugins + +### Database + + + + Serverless PostgreSQL with instant branching, auto scaling, and built-in connection pooling + + + diff --git a/docs/plugins/neon/database.mdx b/docs/plugins/neon/database.mdx new file mode 100644 index 00000000..84420886 --- /dev/null +++ b/docs/plugins/neon/database.mdx @@ -0,0 +1,26 @@ +--- +title: Database +description: serverless PostgreSQL with instant branching, auto scaling, and built-in connection pooling +--- + +## Configuration + + + Neon branch ID for the database + + **Example:** `br-cool-sunset-123456` + + + + Neon project ID + + **Example:** `misty-wind-123456` + + +## Outputs + + + PostgreSQL connection URI (scheme postgresql:// or postgres://) + + **Example:** `postgresql://USER:PASSWORD@HOST:PORT/DB?sslmode=require` +