Skip to content

raydan4/terraria-terraform-aws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraria Terraform

Sets up an environment in AWS to host a public terraria server.

Prerequisites

  1. Terraform
  2. AWS Access Key
  3. AWS Secret Key
  4. AWS S3 bucket (If you want to backup your world)
  5. SSH Keypair

Setup

Create secrets.auto.tfvars file with the following contents

aws_access_key = "<aws_access_key>"
aws_secret_key = "<aws_secret_key>"

terraria_world_s3_bucket = "<terraria_world_s3_bucket>"

authorized_key = "<ssh_public_key>"

terraria_config_password = "<terraria_config_password>"

You can change other default settings like the terraria server port, in this file or other *.auto.tf files. See variables.tf for options.

Usage

Initialize

terraform init

Create infrastructure

terraform apply

And confirm apply

Check server status

ssh admin@<terarria_server_ip> sudo systemctl status terraria.service

note: it may take a few minutes for the terraria server to start

Backup world

ssh admin@<terarria_server_ip> sudo systemctl start terraria-world-backup.service

note: it may take a few minutes for the terraria server to start

Destroy Infrastructure

terraform destroy

And confirm destroy

About

Terraform to deploy a VPC with a Terraria server.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published