/valheim-aws

Terraform module for deploying a Valheim dedicated server to AWS

Primary LanguageHCLGNU General Public License v3.0GPL-3.0

valheim-aws

Terraform module for deploying a Valheim dedicated server to AWS

Requirements

No requirements.

Providers

Name Version
archive 2.2.0
aws 4.48.0
random 3.4.3

Modules

No modules.

Resources

Name Type
aws_cloudwatch_event_rule.sync resource
aws_cloudwatch_event_target.sync resource
aws_cloudwatch_log_group.server resource
aws_datasync_location_efs.backups resource
aws_datasync_location_s3.backups resource
aws_datasync_task.sync resource
aws_default_subnet.default resource
aws_default_vpc.default resource
aws_ecs_cluster.server resource
aws_ecs_service.server resource
aws_ecs_task_definition.server resource
aws_efs_access_point.server resource
aws_efs_file_system.server resource
aws_efs_mount_target.server resource
aws_eip.server resource
aws_iam_role.main resource
aws_iam_role.sync resource
aws_lambda_function.sync resource
aws_lambda_permission.sync resource
aws_lb.main resource
aws_lb_listener.server resource
aws_lb_listener.status resource
aws_lb_listener.supervisor resource
aws_lb_target_group.server resource
aws_lb_target_group.status resource
aws_lb_target_group.supervisor resource
aws_route53_record.server resource
aws_s3_bucket.backups resource
aws_s3_bucket_acl.backups_acl resource
aws_security_group.server resource
aws_security_group_rule.efs resource
aws_security_group_rule.out resource
aws_security_group_rule.ssh resource
aws_security_group_rule.status resource
aws_security_group_rule.supervisor resource
aws_security_group_rule.valheim resource
random_string.cluster_suffix resource
archive_file.sync data source
aws_availability_zones.available data source
aws_canonical_user_id.current data source
aws_route53_zone.zone data source

Inputs

Name Description Type Default Required
adminlist_ids List of admin Steam IDs list(string) [] no
backups Whether the server should create periodic backups bool true no
backups_bucket The name of the S3 bucket to store the world in string "valheim-world" no
backups_cron Cron expression for when to create backups string "0 * * * *" no
backups_directory The directory to store backups in string "/config/backups" no
backups_idle_grace_period Grace period in seconds after the last player has disconnected in which we will still create backups when backups_if_idle is false number 3600 no
backups_if_idle Backup even when no players have been connected for a while bool true no
backups_max_age The maximum age of backups, in days number 3 no
backups_max_count The maximum number of backups to keep (0 or null for infinite) number null no
bannedlist_ids List of banned Steam IDs list(string) [] no
bepinex_config BepInEx config map(map(any)) null no
mods_manager Mods manager to use ('valheim_plus', 'bepinex', or null for no mods) string null no
on_valheim_log_filter_contains Run command hook for log lines containing string null no
on_valheim_log_filter_endswith Run command hook for log lines ending with string null no
on_valheim_log_filter_match Run command hook for log lines exactly matching string null no
on_valheim_log_filter_regexp Run command hook for log lines matching regular expression string null no
on_valheim_log_filter_startswith Run command hook for log lines starting with string null no
permissions_umask Umask to use for backups, config files and directories string "022" no
permittedlist_ids List of permitted Steam IDs list(string) [] no
pgid The group ID to use for the server number 0 no
post_bepinex_config_hook Post-BepInEx config hook command string null no
post_bootstrap_hook Post-bootstrap hook command string null no
post_restart_hook Post-restart hook command string null no
post_server_listening_hook Post-server listening hook command string null no
post_server_run_hook Post-server run hook command string null no
post_server_shutdown_hook Post-server shutdown hook command string null no
post_start_hook Post-start hook command string null no
post_update_check_hook Post-update check hook command string null no
pre_bepinex_config_hook Pre-BepInEx config hook command string null no
pre_bootstrap_hook Pre-bootstrap hook command string null no
pre_restart_hook Pre-restart hook command string null no
pre_server_listening_hook Pre-server listening hook command string null no
pre_server_run_hook Pre-server run hook command string null no
pre_server_shutdown_hook Pre-server shutdown hook command string null no
pre_start_hook Pre-start hook command string null no
pre_supervisor_hook Pre-supervisord hook command string null no
pre_update_check_hook Pre-update check hook command string null no
profile The AWS profile to use string "default" no
puid The user ID to use for the server number 0 no
ram_mb The amount of RAM to use, in MiBs number 8192 no
region The AWS region to use string "us-east-1" no
restart_cron Cron expression for when to restart the server string "0 5 * * *" no
restart_if_idle Only restart the server if it's idle bool true no
route53_zone_id The ID of the Route 53 zone to use, if any string null no
server_args Additional arguments to pass to the server list(string) [] no
server_name The name of the server string "Valheim Server" no
server_pass The password to use for server login string "secret" no
server_port The UDP port to use number 2456 no
server_public Whether to make the server public bool true no
state Target state of the server ('running', 'paused', or 'stopped') string "running" no
status_http_conf The path to the busybox httpd config file string "/config/httpd.conf" no
status_http_htdocs Path to the status httpd htdocs where status.json is written string "/opt/valheim/htdocs" no
status_http_port The port to use for the status HTTP server number 80 no
steamcmd_args Additional arguments to pass to SteamCMD CLI list(string)
[
"validate"
]
no
supervisor_http Whether to enable the Supervisor HTTP server bool false no
supervisor_http_password The password to use for the Supervisor HTTP server any null no
supervisor_http_port The port to use for the Supervisor HTTP server number 9001 no
supervisor_http_username The username to use for the Supervisor HTTP server string "admin" no
syslog_remote_and_local Whether to also log locally when sending logs to a remote syslog server bool true no
syslog_remote_host The remote syslog host or IP to send logs to string null no
syslog_remote_port The remote syslog UDP port to send logs to number 514 no
timezone Timezone for container string "Etc/UTC" no
update_cron Cron expression for when to update the server string "*/15 * * * *" no
update_if_idle Only update the server if it's idle bool true no
valheim_log_filter_contains Filter log lines containing string null no
valheim_log_filter_empty Whether to filter out empty log lines bool true no
valheim_log_filter_endswith Filter log lines ending with string null no
valheim_log_filter_match Filter log lines exactly matching string " " no
valheim_log_filter_regexp Filter log lines matching regular expression string null no
valheim_log_filter_startswith Filter log lines starting with string "(Filename:" no
valheim_log_filter_utf8 Whether to filter out invalid UTF-8 characters bool true no
valheim_plus_config Valheim Plus config map(map(any)) null no
vcpus The number of vCPUs to use number 1 no
world_name The name of the Valheim world string "valheim" no

Outputs

Name Description
domain_name The domain name of the Valheim server
efs_dns_name The DNS name of the EFS file system used by the Valheim server
iam_role_name The name of the IAM role used by the Valheim server
security_group_id The ID of the security group used by the Valheim server
server_ip The IP address of the Valheim server