|
1 | | -# Copy this file to terraform.tfvars and customize. |
2 | | -# terraform.tfvars is gitignored — safe to put passwords here. |
3 | | - |
4 | | -aws_region = "us-east-1" |
5 | | -project_name = "game-servers" |
6 | | - |
7 | | -# Domain for server DNS records (must have a hosted zone in Route 53) |
8 | | -# Creates: palworld.codercoco.com, satisfactory.codercoco.com, etc. |
9 | | -hosted_zone_name = "codercoco.com" |
10 | | - |
11 | | -# Watchdog: auto-shuts down idle servers after (interval × idle_checks) minutes |
12 | | -# Defaults: 15 min × 4 checks = 60 minutes of idle before shutdown |
13 | | -# For testing, use: watchdog_interval_minutes=2, watchdog_idle_checks=2 |
14 | | -watchdog_interval_minutes = 15 |
15 | | -watchdog_idle_checks = 4 |
16 | | -watchdog_min_packets = 100 |
17 | | - |
18 | | -# ACM certificate domain for HTTPS game servers (default: *.{hosted_zone_name}) |
19 | | -# acm_certificate_domain = "*.codercoco.com" |
20 | | - |
21 | | -# Discord bot credentials (optional — leave commented out to configure via the web UI). |
22 | | -# If set here, they seed the backing stores on the first `terraform apply`. |
23 | | -# terraform.tfvars is gitignored, so it's safe to put real values here. |
24 | | -# Get all three from https://discord.com/developers/applications → your app: |
25 | | -# - Application ID: General Information → "Application ID". (goes to DynamoDB) |
26 | | -# - Bot token: Bot → Reset Token → copy once (like a password). (goes to Secrets Manager) |
27 | | -# - Public key: General Information → "Public Key". (goes to Secrets Manager) |
28 | | -# discord_application_id = "1234567890" |
29 | | -# discord_bot_token = "MTIz...xyz" |
30 | | -# discord_public_key = "0123abc..." |
31 | | - |
32 | | -# Base allowlist / admins (optional — permanent floor managed by Terraform). |
33 | | -# Guilds and admin user/role IDs listed here are written to a separate |
34 | | -# BASE#discord DynamoDB row on every `terraform apply`. The management UI |
35 | | -# shows them as locked and cannot remove them; only editing these lists and |
36 | | -# re-applying Terraform can change the base set. |
37 | | -# base_allowed_guilds = ["123456789012345678"] |
38 | | -# base_admin_user_ids = ["987654321098765432"] |
39 | | -# base_admin_role_ids = [] |
40 | | - |
41 | | -# Override game server settings (optional — defaults are set in variables.tf) |
42 | | -game_servers = { |
43 | | - palworld = { |
44 | | - image = "thijsvanloef/palworld-server-docker:latest" |
45 | | - cpu = 2048 |
46 | | - memory = 8192 |
47 | | - ports = [ |
48 | | - { container = 8211, protocol = "udp" }, |
49 | | - { container = 27015, protocol = "udp" }, |
50 | | - ] |
51 | | - environment = [ |
52 | | - { name = "PLAYERS", value = "8" }, |
53 | | - { name = "MULTITHREADING", value = "true" }, |
54 | | - { name = "RCON_ENABLED", value = "true" }, |
55 | | - { name = "RCON_PORT", value = "25575" }, |
56 | | - { name = "ADMIN_PASSWORD", value = "your_secure_password_here" }, |
57 | | - { name = "SERVER_NAME", value = "CoderCoco Palworld" }, |
58 | | - { name = "UPDATE_ON_BOOT", value = "true" }, |
59 | | - { name = "BACKUP_ENABLED", value = "true" }, |
60 | | - { name = "BACKUP_CRON_EXPRESSION", value = "0 */6 * * *" }, |
61 | | - { name = "DIFFICULTY", value = "Normal" }, |
62 | | - ] |
63 | | - # Each entry gets its own EFS access point rooted at /${game}/${name}. |
64 | | - # Add more entries if the image expects multiple mount paths. |
65 | | - volumes = [ |
66 | | - { name = "saves", container_path = "/palworld" }, |
67 | | - ] |
68 | | - https = false |
69 | | - } |
70 | | - |
71 | | - # FoundryVTT — web-based virtual tabletop (requires HTTPS) |
72 | | - # The felddy/foundryvtt image needs FOUNDRY_USERNAME + FOUNDRY_PASSWORD |
73 | | - # to download the licensed FoundryVTT software on first run. |
74 | | - foundryvtt = { |
75 | | - image = "felddy/foundryvtt:release" |
76 | | - cpu = 1024 |
77 | | - memory = 2048 |
78 | | - ports = [ |
79 | | - { container = 30000, protocol = "tcp" }, |
80 | | - ] |
81 | | - environment = [ |
82 | | - { name = "FOUNDRY_USERNAME", value = "your_foundry_username" }, |
83 | | - { name = "FOUNDRY_PASSWORD", value = "your_foundry_password" }, |
84 | | - { name = "FOUNDRY_ADMIN_KEY", value = "your_admin_key" }, |
85 | | - { name = "FOUNDRY_PROXY_SSL", value = "true" }, |
86 | | - { name = "FOUNDRY_PROXY_PORT", value = "443" }, |
87 | | - { name = "CONTAINER_VERBOSE", value = "true" }, |
88 | | - { name = "FOUNDRY_WORLD", value = "my-world" }, |
89 | | - ] |
90 | | - volumes = [ |
91 | | - { name = "data", container_path = "/data" }, |
92 | | - ] |
93 | | - https = true |
94 | | - } |
95 | | -} |
| 1 | +# Copy this file to terraform.tfvars and customize. |
| 2 | +# terraform.tfvars is gitignored — safe to put passwords here. |
| 3 | + |
| 4 | +aws_region = "us-east-1" |
| 5 | +project_name = "game-servers" |
| 6 | + |
| 7 | +# Domain for server DNS records (must have a hosted zone in Route 53) |
| 8 | +# Creates: {game}.example.com for each entry in game_servers below. |
| 9 | +hosted_zone_name = "example.com" |
| 10 | + |
| 11 | +# Watchdog: auto-shuts down idle servers after (interval × idle_checks) minutes |
| 12 | +# Defaults: 15 min × 4 checks = 60 minutes of idle before shutdown |
| 13 | +# For testing, use: watchdog_interval_minutes=2, watchdog_idle_checks=2 |
| 14 | +watchdog_interval_minutes = 15 |
| 15 | +watchdog_idle_checks = 4 |
| 16 | +watchdog_min_packets = 100 |
| 17 | + |
| 18 | +# ACM certificate domain for HTTPS game servers (default: *.{hosted_zone_name}) |
| 19 | +# acm_certificate_domain = "*.example.com" |
| 20 | + |
| 21 | +# Discord bot credentials (optional — leave commented out to configure via the web UI). |
| 22 | +# If set here, they seed the backing stores on the first `terraform apply`. |
| 23 | +# terraform.tfvars is gitignored, so it's safe to put real values here. |
| 24 | +# Get all three from https://discord.com/developers/applications → your app: |
| 25 | +# - Application ID: General Information → "Application ID". (goes to DynamoDB) |
| 26 | +# - Bot token: Bot → Reset Token → copy once (like a password). (goes to Secrets Manager) |
| 27 | +# - Public key: General Information → "Public Key". (goes to Secrets Manager) |
| 28 | +# discord_application_id = "1234567890" |
| 29 | +# discord_bot_token = "MTIz...xyz" |
| 30 | +# discord_public_key = "0123abc..." |
| 31 | + |
| 32 | +# Base allowlist / admins (optional — permanent floor managed by Terraform). |
| 33 | +# Guilds and admin user/role IDs listed here are written to a separate |
| 34 | +# BASE#discord DynamoDB row on every `terraform apply`. The management UI |
| 35 | +# shows them as locked and cannot remove them; only editing these lists and |
| 36 | +# re-applying Terraform can change the base set. |
| 37 | +# base_allowed_guilds = ["123456789012345678"] |
| 38 | +# base_admin_user_ids = ["987654321098765432"] |
| 39 | +# base_admin_role_ids = [] |
| 40 | + |
| 41 | +# Game server definitions — required, no defaults are provided. |
| 42 | +# Each entry creates its own ECS task definition, EFS access point, log group, |
| 43 | +# and security group rules. Add as many games as you need. |
| 44 | +# |
| 45 | +# Example entry (Palworld): |
| 46 | +# game_servers = { |
| 47 | +# palworld = { |
| 48 | +# image = "thijsvanloef/palworld-server-docker:latest" |
| 49 | +# cpu = 2048 |
| 50 | +# memory = 8192 |
| 51 | +# ports = [ |
| 52 | +# { container = 8211, protocol = "udp" }, |
| 53 | +# { container = 27015, protocol = "udp" }, |
| 54 | +# ] |
| 55 | +# environment = [ |
| 56 | +# { name = "PLAYERS", value = "16" }, |
| 57 | +# { name = "MULTITHREADING", value = "true" }, |
| 58 | +# { name = "RCON_ENABLED", value = "true" }, |
| 59 | +# { name = "RCON_PORT", value = "25575" }, |
| 60 | +# { name = "ADMIN_PASSWORD", value = "your_secure_password_here" }, |
| 61 | +# { name = "SERVER_NAME", value = "My Palworld Server" }, |
| 62 | +# { name = "UPDATE_ON_BOOT", value = "true" }, |
| 63 | +# { name = "BACKUP_ENABLED", value = "true" }, |
| 64 | +# { name = "BACKUP_CRON_EXPRESSION", value = "0 */6 * * *" }, |
| 65 | +# { name = "DIFFICULTY", value = "Normal" }, |
| 66 | +# ] |
| 67 | +# # Each entry gets its own EFS access point rooted at /${game}/${name}. |
| 68 | +# # Add more entries if the image expects multiple mount paths. |
| 69 | +# volumes = [ |
| 70 | +# { name = "saves", container_path = "/palworld" }, |
| 71 | +# ] |
| 72 | +# https = false |
| 73 | +# } |
| 74 | +# } |
0 commit comments