Skip to main content
The Terraform stack provisions all AWS infrastructure and bootstraps Greptile automatically.

What Gets Created

Prerequisites

Your AWS user/role needs permissions for:
  • EC2 (instances, security groups, key pairs)
  • RDS (instances, subnet groups, parameter groups)
  • ElastiCache (clusters, subnet groups)
  • VPC (VPCs, subnets, route tables, NAT gateways, internet gateways)
  • S3 (buckets, objects)
  • IAM (roles, policies, instance profiles)
  • Container registry credentials (CONTAINER_REGISTRY, GREPTILE_TAG)
  • License (contact hello@greptile.com)
Create a GitHub App with:
  • Webhook URL: http://<EC2_IP>:3007/webhook (update after deployment)
  • Permissions: Contents (read), Pull requests (read/write), Issues (read/write)
  • Events: Pull request, Push, Issue comment
You’ll need: App ID, Client ID, Client Secret, Private Key, Webhook Secret
API keys for at least one provider:

Setup

1

Clone the repository

2

Create configuration file

3

Edit terraform.tfvars

See terraform.tfvars.example for all options.
4

Initialize and deploy

Deployment takes 10-15 minutes.
5

Get the URL

Update your GitHub App webhook URL to http://<EC2_IP>:3007/webhook.

Access

Configuration

Modify ec2_instance_type in terraform.tfvars:
Modify db_instance_class:
To enable SSH access:

Operations

Destroy

To remove all infrastructure:
This deletes everything including the database. Export data first if needed.

Troubleshooting

  • Verify security group allows inbound on ports 3000, 3007, 8080
  • Check EC2 is in public subnet with internet gateway
  • Confirm EC2 instance is running: aws ec2 describe-instances
SSH in and check:
  • Verify RDS security group allows traffic from EC2 security group
  • Check RDS instance is available: aws rds describe-db-instances
  • Update GitHub App webhook URL to http://<EC2_IP>:3007/webhook
  • Check security group allows inbound on port 3007
  • Verify webhook secret matches github_webhook_secret in tfvars

Resources