This example deploys Gubernator into AWS ECS with AWS ECS Service Discovery as peer discovery service.
This will set up an ECS Cluster that runs AWS Fargate Spot (which is very cheap to run).
To test this, you'd need to be inside the VPC that this example creates or somehow peer the VPC you're going to use with this example.
Also don't forget to add NS records generated from this to your main Hosted Zone.
e.g. your main hosted zone is example.com
and you input dns_namespace
as gubernator.example.com
, this will create a new Hosted Zone in Route53 with NS record (gubernator.example.com
) and make sure to add those NS record to example.com
else when you query gubernator.example.com
it won't work.
Real gubernator would be accessible in app.gubernator.example.com
Name | Version |
---|---|
terraform | >= 0.12.26 |
aws | >= 3.35.0 |
Name | Version |
---|---|
aws | 3.54.0 |
Name | Source | Version |
---|---|---|
app_security_group | terraform-aws-modules/security-group/aws | ~> 3.0 |
ecs_cluster | HENNGE/ecs/aws | ~> 2.0 |
gubernator_service | HENNGE/ecs/aws//modules/simple/fargate-spot | ~> 2.0 |
vpc | terraform-aws-modules/vpc/aws | ~> 3.0 |
Name | Type |
---|---|
aws_cloudwatch_log_group.gubernator | resource |
aws_iam_role.ecs_agent_role | resource |
aws_iam_role.ecs_task_role | resource |
aws_iam_role_policy.ecs_agent | resource |
aws_iam_role_policy.ecs_exec_permissions | resource |
aws_iam_role_policy.ecs_task_cloudwatch_access | resource |
aws_service_discovery_public_dns_namespace.namespace | resource |
aws_service_discovery_service.gubernator | resource |
aws_availability_zones.available | data source |
aws_region.current_region | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
dns_namespace | The domain name the service should run. Your Gubernator instances will be available at app.<your inputted fqdn>. |
string |
n/a | yes |
gubernator_config | Map of ECS Configuration for gubernator service. map(cpu, memory) | any |
{ |
no |
gubernator_debug_mode | Enable GUBER_DEBUG env flag | bool |
false |
no |
gubernator_repository | Gubernator Docker Repository. e.g. ghcr.io/mailgun/gubernator | string |
n/a | yes |
gubernator_version | Gubernator docker tag to use | string |
n/a | yes |
prefix | Prefix of created resources | string |
n/a | yes |
vpc_cidr | IPv4 CIDR Notation for VPC IP range. e.g. 10.3.0.0/16 | string |
n/a | yes |
No outputs.