tailscale-subnet-router

hardfinhq/tailscale-subnet-router/aws

Terraform Module HCL AWS

Terraform module for Tailscale subnet router in AWS ECS Fargate

Install
module "tailscale-subnet-router" {
source = "hardfinhq/tailscale-subnet-router/aws"
version = "1.20230313.1"
}
plain text: /constructs/tfmod-hardfinhq-tailscale-subnet-router-aws/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform module for Tailscale subnet router in ECS Fargate This module deploys a Tailscale [subnet router][1] as an [AWS Fargate][2] ECS task. The subnet router runs within an AWS VPC and advertises (to the Tailnet) the entire CIDR block for that VPC. Docker Container The _docker/tailscale.Dockerfile file extends the tailscale/tailscale [image][3] with an entrypoint script that starts the Tailscale daemon and runs tailscale up using an [auth key][4] and the relevant advertised CIDR block. This Docker container must be built and [pushed][5] to an ECR repository. ``bash docker build \ --tag tailscale-subnet-router:v1.20230311.1 \ --file ./_docker/tailscale.Dockerfile \ . Optionally override the tag for the base tailscale/tailscale image docker build \ --build-arg TAILSCALE_TAG=v1.36.2 \ --t

Inputs (15)
NameTypeDescriptionDefault
security_group_idslist(string)The security group IDs to associate with the subnet router ECS service and EFS m required
vpcstringThe name of the VPC where the subnet router ECS service will be launched required
target_ecs_clusterstringThe name of the target ECS cluster required
subnet_groupstringThe group (tag) of the VPC subnets where the subnet router ECS service will be l required
tailscale_auth_key_secretstringThe name of secret where the Tailscale auth key is stored required
tailscale_docker_repositorystringThe name of ECR repository where the Docker image stored required
tailscale_docker_tagstringThe name of tag for the Docker image stored in ECR required
namestringThe name of the subnet router deployment. If unspecified the VPC name will be usnull
enable_execute_commandboolAllows AWS ECS exec into the task containers. The `enable_execute_command` fielfalse
additional_routeslist(string)A list of additional CIDR blocks to pass to Tailscale as routes to advertise[]
cpunumberThe CPU value to assign to the container (vCPU)256
additional_flagsstringAdditional flags to pass to the tailscale up command""
memorynumberThe memory value to assign to the container (MiB)512
assign_public_ipboolThe 'assign_public_ip' flag for the ECS task network configuration. The `assignfalse
cpu_architecturestringThe CPU architecture to use for the container. Either X86_64 or ARM64."X86_64"
Outputs (1)
tailscale_ecs_task_role_name — The name of the IAM role created for the ECS task that runs Tailscale
Details
FrameworkTerraform Module
LanguageHCL
Version1.20230313.1
Cloud AWS
★ Stars33
Forks8
Total downloads4.0k
Inputs15
Outputs1
Submodules1
LicenseApache-2.0
Namespacehardfinhq
Updated