• Stars
    star
    151
  • Rank 246,057 (Top 5 %)
  • Language HCL
  • License
    MIT License
  • Created over 5 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Terraform module to deploy Hasura graphql engine on AWS

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                         = "3.X.Y"
  region                          = "YOUR DEPLOYMENT REGION"
  domain                          = "YOUR DOMAIN NAME"
  hasura_subdomain                = "HASURA ENDPOINT SUBDOMAIN"
  app_subdomain                   = "YOUR HASURA APP SUBDOMAIN (FOR CORS)"
  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"
  hasura_console_enabled          = "ENABLE HASURA CONSOLE"
  rds_db_name                     = "YOUR DATABASE NAME"
  rds_instance                    = "YOUR DATABASE INSTANCE SIZE"
  rds_username                    = "YOUR DATABASE USERNAME"
  rds_password                    = "YOUR DATABASE PASSWORD"
  rds_storage_encrypted           = "ENABLE DATABASE ENCRYPTION"
  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"
  additional_db_security_groups   = "ADDITIONAL GROUPS ASSIGNED TO RDS INSTANCE"
  create_iam_service_linked_role  = "FALSE IF ROLE IS ALREADY CREATED"
  ecs_cluster_name                = "YOUR CLUSTER NAME"
}

Additional info about variables

  • hasura_version_tag comes from here (e.g. "v.2.0.0-alpha.3")
  • az_count needs to be at least 2 or higher (due to AWS constraints, an rds instance must have at least one availability zone for failover)
  • hasura_console_enabled must be a string (i.e. "true") and NOT a boolean (i.e. true). Other true/false variables can be booleans
  • rds_db_name must only contain alphanumeric characters and start with a letter
  • ecs_cluster_name must only contain alphanumeric characters and start with a letter
  • domain must be a domain you have a Route 53 hosted zone for

License

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

More Repositories

1

dhash

Perceptual hashing algorithm (dhash) to find similar images
Python
26
star
2

nsfw_japan

nsfw dataset with images and text for content moderation in Japan
15
star
3

okami

Adaptive colour schemes for Sublime Text 3
8
star
4

bias-viz

A visualization of cognitive bias codex
JavaScript
5
star
5

adjectives

A data dump of all adjectives in English language
4
star
6

postmortem

Get to the root cause of an issue, learn from it, and make sure it doesnโ€™t happen again.
4
star
7

japan-ipv6

Summary of IPv6 support in Japan by FLET's Hikari ISP
3
star
8

mason

A visual css grid layout editor and code generator
JavaScript
3
star
9

palette.less

A color generator module for LESS project that meets WCAG 2.0 4.5:1 minimum contrast (AA level)
JavaScript
2
star
10

excalibur

A turn based old school RPG game built to teach kids how to code in JavaScript.
JavaScript
2
star
11

solarized-lab

Solarized in OKLab color space
2
star
12

twitter-scripts

Hobby scripts to mess around with my twitter account
Python
1
star
13

flexbox-visualization

A utility to explore flexbox properties based on Chris Coyier's flexbox guide
HTML
1
star
14

gazetteer

Geospatial Information of Japan
1
star
15

noisy-images

Generate thumbnails using perlin noise
Rust
1
star
16

steps-discord-message

Send a discord message from bitrise
Go
1
star
17

axios-slim

A tiny alternative to axios for nodejs
JavaScript
1
star
18

node-aws

Docker image with ruby, node, and aws cli
Dockerfile
1
star
19

nocapes

Just another vdom library but without capes!
JavaScript
1
star
20

gyaku

Deobfuscate minified code from source maps
Ruby
1
star
21

servicejack

List of local services with port numbers
1
star