Auto-generated
This page is generated by terraform-docs at build time from the infra/ repo. Do not edit manually.
Atrax ECS Cluster¶
EC2-backed ECS cluster for atrax-node crawler workers. Runs in a dedicated VPC (typically eu-west-1, separate from the rest of the production network) with a fixed set of public-subnet EC2 instances. Each instance has its own Elastic IP attached so each crawler egresses from a distinct, customer-whitelisted source IP.
The cluster is deliberately not ASG-backed: node count is pinned to the number of pre-allocated EIPs, and the spread placement strategy on the atrax-node service fans tasks across hosts so every EIP carries traffic. Vertical scaling (instance type + tasks-per-host) replaces horizontal scaling.
EIPs are declared here but expected to be imported per environment, never allocated by terraform.
Requirements¶
| Name | Version |
|---|---|
| terraform | >= 1.6.0 |
| aws | ~> 5.0 |
Providers¶
| Name | Version |
|---|---|
| aws | ~> 5.0 |
Modules¶
No modules.
Resources¶
| Name | Type |
|---|---|
| aws_ecs_cluster.atrax | resource |
| aws_eip.node | resource |
| aws_eip_association.node | resource |
| aws_iam_instance_profile.ecs_instance_profile | resource |
| aws_iam_role.ecs_instance_role | resource |
| aws_iam_role_policy_attachment.ecs_instance_policy | resource |
| aws_iam_role_policy_attachment.ecs_instance_ssm | resource |
| aws_instance.node | resource |
| aws_security_group.ecs | resource |
| aws_ami.ecs_optimized | data source |
| aws_iam_policy_document.ecs_ec2_assume_role | data source |
Inputs¶
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
| ami_id | ECS-optimised AMI ID to use for container instances. When null, the latest Amazon Linux 2 ECS HVM AMI is resolved automatically (convenient for dev/stage; not recommended for production where AMI updates should happen during a planned maintenance window). | string |
null |
no |
| base_tags | Base tags for resources | map(string) |
{} |
no |
| environment | Environment name | string |
n/a | yes |
| group | Logical group/area | string |
"atrax" |
no |
| instance_type | EC2 instance type for ECS container instances | string |
n/a | yes |
| name_prefix | Prefix for resource names | string |
n/a | yes |
| node_count | Number of EC2 container instances (1-3). Must match the number of EIPs available to import. | number |
n/a | yes |
| region | AWS region | string |
n/a | yes |
| root_volume_size | Root EBS volume size in GiB | number |
30 |
no |
| subnet_ids | Public subnet IDs keyed by AZ short name (a/b/c). Up to node_count keys are used; one instance is launched per key. | map(string) |
n/a | yes |
| vpc_id | VPC ID where the cluster runs | string |
n/a | yes |
Outputs¶
| Name | Description |
|---|---|
| cluster_arn | ARN of the ECS cluster |
| cluster_name | Name of the ECS cluster |
| instance_ids | EC2 instance IDs keyed by AZ short name |
| public_ips | Public IPs (EIPs) of the ECS hosts keyed by AZ short name |
| security_group_id | Security group ID of the ECS hosts |