Skip to content
Terraform module to deploy Hasura graphql engine on AWS
HCL
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE Updates repository name in license file Jun 17, 2019
README.md
main.tf
outputs.tf Moves outputs from main to new outputs.tf file Jun 6, 2019
variables.tf Add var to add more ingress SGs to hasura_rds SG Sep 30, 2019
versions.tf Renames variable file Jun 6, 2019

README.md

Hasura on AWS

supports terraform-0.12

Terraform module to deploy Hasura GraphQL Engine on AWS. This will deploy across multiple Availability Zones (AZ) with the following components:

  • Postgres RDS deployed in multiple AZ
  • Hasura GraphQL Engine in Fargate across multiple AZ
  • ALB for load balancing between the hasura tasks
  • Certificate issued by ACM for securing traffic to ALB
  • Logging for RDS, ECS, and ALB into Cloudwatch Logs

Support

The master branch supports Terraform v0.12 and later. For Terraform v0.11 and older versions check other git branches.

Glossary

  • AZ: Availability Zone
  • ALB: Application Load Balancer
  • ACM: AWS Certificate Manager
  • ECS: Elastic Container Service
  • RDS: Relational Database Service

Requirements

  • AWS account
    • IAM user
    • domain with Route53
  • Terraform v0.12

Usage

Copy and paste into your Terraform configuration, edit the variables, and run terraform init

module "hasura" {
  source                    = "Rayraegah/hasura/aws"
  version                   = "2.X.Y"
  region                    = "YOUR DEPLOYMENT REGION"
  domain                    = "YOUR DOMAIN NAME"
  app_subdomain             = "YOUR HASURA APP SUBDOMAIN"
  hasura_version_tag        = "HASURA VERSION TAG FOR DEPLOYMENT"
  hasura_admin_secret       = "YOUR HASURA ADMIN SECRET"
  hasura_jwt_secret_algo    = "ALGORITHM FOR JWT VERIFICATION (HMAC or RS256)"
  hasura_jwt_secret_key     = "YOUR PUBLIC KEY FOR JWT VERIFICATION"
  rds_db_name               = "YOUR DATABASE NAME"
  rds_instance              = "YOUR DATABASE INSTANCE SIZE"
  rds_username              = "YOUR DATABASE USERNAME"
  rds_password              = "YOUR DATABASE PASSWORD"
  multi_az                  = "ENABLE MULTIPLE AVAILABILITY ZONES"
  az_count                  = "NUMBER OF AVAILABILITY ZONES"
  vpc_enable_dns_hostnames  = "ENABLE DNS HOSTNAMES"
  environment               = "ENV VARS FOR ECS TASK"
}

License

Released under MIT License. Based on Gordon Johnston's proposed architecture.

You can’t perform that action at this time.