{"id":28200179,"url":"https://github.com/harry-moore-dev/terraform-aws-minecraft-server-module","last_synced_at":"2026-04-29T01:31:11.694Z","repository":{"id":221919342,"uuid":"755721493","full_name":"Harry-Moore-dev/terraform-aws-minecraft-server-module","owner":"Harry-Moore-dev","description":"Terraform module to deploy a Minecraft server to AWS","archived":false,"fork":false,"pushed_at":"2024-05-13T21:21:38.000Z","size":58,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-16T20:11:06.431Z","etag":null,"topics":["aws","minecraft","minecraft-server","terraform-module"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/modules/Harry-Moore-dev/minecraft-server-module/aws/latest","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Harry-Moore-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-10T22:07:27.000Z","updated_at":"2024-02-11T03:21:19.000Z","dependencies_parsed_at":"2024-02-21T23:26:38.327Z","dependency_job_id":"a546c505-9507-4b00-ac3e-44a3fdd26214","html_url":"https://github.com/Harry-Moore-dev/terraform-aws-minecraft-server-module","commit_stats":null,"previous_names":["harry-moore-dev/terraform-aws-minecraft-server-module"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-Moore-dev%2Fterraform-aws-minecraft-server-module","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-Moore-dev%2Fterraform-aws-minecraft-server-module/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-Moore-dev%2Fterraform-aws-minecraft-server-module/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-Moore-dev%2Fterraform-aws-minecraft-server-module/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Harry-Moore-dev","download_url":"https://codeload.github.com/Harry-Moore-dev/terraform-aws-minecraft-server-module/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Harry-Moore-dev%2Fterraform-aws-minecraft-server-module/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259162742,"owners_count":22815007,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","minecraft","minecraft-server","terraform-module"],"created_at":"2025-05-16T20:10:51.537Z","updated_at":"2026-04-29T01:31:06.672Z","avatar_url":"https://github.com/Harry-Moore-dev.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# terraform-aws-minecraft-server-module\nTerraform module to deploy a Minecraft server to AWS. This module is designed to be stateless and ephemeral, creating and destroying a new server should be possible without affecting the saved Minecraft worlds, this is acheived by storing the saved data in s3 externally to this module on a destroy event.\n\n# Usage\n\nSimple example:\n```hcl\nmodule \"beamMP_server\" {\n  source              = \"Harry-Moore-dev/minecraft-server-module/aws\"\n  version             = \"1.0.0\"\n  s3_save_bucket_name = \"some-save-bucket\"\n}\n```\n\nDetailed example:\n```hcl\nmodule \"beamMP_server\" {\n  source              = \"Harry-Moore-dev/minecraft-server-module/aws\"\n  version             = \"1.0.0\"\n  s3_save_bucket_name = \"some-save-bucket\"\n\n  region              = \"eu-west-1\"\n  ec2_instance_type   = \"t3.large\"\n  ec2_ebs_volume_size = 8\n\n  ec2_spot_instance_price   = \"0.01\"\n  ec2_spot_instance_enabled = true\n\n  server_port               = 25565\n}\n```\n\n### Loading save data\n\nThis project creates an S3 bucket in your AWS account and load the save data to a path of your choice. All save files in that path will be copied over to the server on creation so sufficient ebs volume size should be specified depending on the size of the saves loaded. On instance termination (if running) the current world will be saved to the s3 bucket for future use.\n\n## Pre-commit config\n\nInstall dependencies for pre-commit.\n```\nbrew install pre-commit terraform-docs tflint tfsec\n```\n\n\u003c!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n## Requirements\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"requirement_terraform\"\u003e\u003c/a\u003e [terraform](#requirement\\_terraform) | \u003e= 1.5.7 |\n| \u003ca name=\"requirement_aws\"\u003e\u003c/a\u003e [aws](#requirement\\_aws) | 5.36.0 |\n| \u003ca name=\"requirement_null\"\u003e\u003c/a\u003e [null](#requirement\\_null) | \u003e= 3.2.2 |\n\n## Providers\n\n| Name | Version |\n|------|---------|\n| \u003ca name=\"provider_aws\"\u003e\u003c/a\u003e [aws](#provider\\_aws) | 5.36.0 |\n| \u003ca name=\"provider_null\"\u003e\u003c/a\u003e [null](#provider\\_null) | 3.2.2 |\n\n## Modules\n\n| Name | Source | Version |\n|------|--------|---------|\n| \u003ca name=\"module_ec2\"\u003e\u003c/a\u003e [ec2](#module\\_ec2) | terraform-aws-modules/ec2-instance/aws | 5.6.0 |\n| \u003ca name=\"module_security_group\"\u003e\u003c/a\u003e [security\\_group](#module\\_security\\_group) | terraform-aws-modules/security-group/aws | 5.1.0 |\n\n## Resources\n\n| Name | Type |\n|------|------|\n| [aws_default_vpc.default](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/resources/default_vpc) | resource |\n| [aws_iam_instance_profile.ssm_instance_profile](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/resources/iam_instance_profile) | resource |\n| [aws_iam_policy.s3_write_policy](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/resources/iam_policy) | resource |\n| [aws_iam_role.ssm_role](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/resources/iam_role) | resource |\n| [aws_iam_role_policy_attachment.s3_write_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_iam_role_policy_attachment.ssm_policy_attachment](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/resources/iam_role_policy_attachment) | resource |\n| [aws_subnet.public_subnet](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/resources/subnet) | resource |\n| [null_resource.create_s3_bucket_if_doesnt_exist](https://registry.terraform.io/providers/hashicorp/null/latest/docs/resources/resource) | resource |\n| [aws_availability_zones.available](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/data-sources/availability_zones) | data source |\n| [aws_ssm_parameter.latest_ami](https://registry.terraform.io/providers/hashicorp/aws/5.36.0/docs/data-sources/ssm_parameter) | data source |\n\n## Inputs\n\n| Name | Description | Type | Default | Required |\n|------|-------------|------|---------|:--------:|\n| \u003ca name=\"input_ec2_architecture\"\u003e\u003c/a\u003e [ec2\\_architecture](#input\\_ec2\\_architecture) | ec2 instance architecture | `string` | `\"x86_64\"` | no |\n| \u003ca name=\"input_ec2_ebs_volume_size\"\u003e\u003c/a\u003e [ec2\\_ebs\\_volume\\_size](#input\\_ec2\\_ebs\\_volume\\_size) | ec2 ebs volume size | `number` | `15` | no |\n| \u003ca name=\"input_ec2_instance_type\"\u003e\u003c/a\u003e [ec2\\_instance\\_type](#input\\_ec2\\_instance\\_type) | ec2 instance type | `string` | `\"t3.large\"` | no |\n| \u003ca name=\"input_ec2_spot_instance_enabled\"\u003e\u003c/a\u003e [ec2\\_spot\\_instance\\_enabled](#input\\_ec2\\_spot\\_instance\\_enabled) | use ec2 spot instances (cheaper but can be terminated at any time) | `bool` | `false` | no |\n| \u003ca name=\"input_ec2_spot_instance_price\"\u003e\u003c/a\u003e [ec2\\_spot\\_instance\\_price](#input\\_ec2\\_spot\\_instance\\_price) | ec2 spot instance price (adjust this for the instance type if using spot instances) | `string` | `\"0.01\"` | no |\n| \u003ca name=\"input_mc_admins\"\u003e\u003c/a\u003e [mc\\_admins](#input\\_mc\\_admins) | A map of admins where the key is the UUID and the value is the username | \u003cpre\u003elist(object({\u003cbr\u003e    uuid                = string\u003cbr\u003e    name                = string\u003cbr\u003e    level               = number\u003cbr\u003e    bypassesPlayerLimit = bool\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_mc_allocated_memory\"\u003e\u003c/a\u003e [mc\\_allocated\\_memory](#input\\_mc\\_allocated\\_memory) | The amount of memory allocated to the Minecraft server java runtime in MB | `number` | `1024` | no |\n| \u003ca name=\"input_mc_allow_flight\"\u003e\u003c/a\u003e [mc\\_allow\\_flight](#input\\_mc\\_allow\\_flight) | Whether flight is allowed on the Minecraft server | `bool` | `false` | no |\n| \u003ca name=\"input_mc_allow_nether\"\u003e\u003c/a\u003e [mc\\_allow\\_nether](#input\\_mc\\_allow\\_nether) | Whether the nether is allowed on the Minecraft server | `bool` | `true` | no |\n| \u003ca name=\"input_mc_custom_seed\"\u003e\u003c/a\u003e [mc\\_custom\\_seed](#input\\_mc\\_custom\\_seed) | Specify a custom seed for the Minecraft server (a random seed will be used if not specified) | `string` | `\"\"` | no |\n| \u003ca name=\"input_mc_difficulty\"\u003e\u003c/a\u003e [mc\\_difficulty](#input\\_mc\\_difficulty) | The difficulty for the Minecraft server | `string` | `\"easy\"` | no |\n| \u003ca name=\"input_mc_enable_command_block\"\u003e\u003c/a\u003e [mc\\_enable\\_command\\_block](#input\\_mc\\_enable\\_command\\_block) | Whether command blocks are enabled on the server | `bool` | `false` | no |\n| \u003ca name=\"input_mc_force_gamemode\"\u003e\u003c/a\u003e [mc\\_force\\_gamemode](#input\\_mc\\_force\\_gamemode) | Whether to force the game mode on the Minecraft server | `bool` | `false` | no |\n| \u003ca name=\"input_mc_game_mode\"\u003e\u003c/a\u003e [mc\\_game\\_mode](#input\\_mc\\_game\\_mode) | The game mode for the Minecraft server | `string` | `\"survival\"` | no |\n| \u003ca name=\"input_mc_generate_structures\"\u003e\u003c/a\u003e [mc\\_generate\\_structures](#input\\_mc\\_generate\\_structures) | Whether structures are generated in the Minecraft server | `bool` | `true` | no |\n| \u003ca name=\"input_mc_hardcore\"\u003e\u003c/a\u003e [mc\\_hardcore](#input\\_mc\\_hardcore) | Whether hardcore mode is enabled on the Minecraft server | `bool` | `false` | no |\n| \u003ca name=\"input_mc_level_name\"\u003e\u003c/a\u003e [mc\\_level\\_name](#input\\_mc\\_level\\_name) | The name of the level for the Minecraft server | `string` | `\"world\"` | no |\n| \u003ca name=\"input_mc_level_type\"\u003e\u003c/a\u003e [mc\\_level\\_type](#input\\_mc\\_level\\_type) | The type of level for the Minecraft server (: character must be double escaped with a backslash) | `string` | `\"minecraft\\\\:normal\"` | no |\n| \u003ca name=\"input_mc_max_players\"\u003e\u003c/a\u003e [mc\\_max\\_players](#input\\_mc\\_max\\_players) | The maximum number of players for the Minecraft server | `number` | `20` | no |\n| \u003ca name=\"input_mc_max_world_size\"\u003e\u003c/a\u003e [mc\\_max\\_world\\_size](#input\\_mc\\_max\\_world\\_size) | The maximum world size for the Minecraft server | `number` | `29999984` | no |\n| \u003ca name=\"input_mc_name\"\u003e\u003c/a\u003e [mc\\_name](#input\\_mc\\_name) | The name of the Minecraft server | `string` | `\"Minecraft Server\"` | no |\n| \u003ca name=\"input_mc_player_idle_timeout\"\u003e\u003c/a\u003e [mc\\_player\\_idle\\_timeout](#input\\_mc\\_player\\_idle\\_timeout) | The idle timeout for the Minecraft server (0 to disable) | `number` | `0` | no |\n| \u003ca name=\"input_mc_pvp\"\u003e\u003c/a\u003e [mc\\_pvp](#input\\_mc\\_pvp) | Whether PVP is enabled on the server | `bool` | `true` | no |\n| \u003ca name=\"input_mc_resource_pack\"\u003e\u003c/a\u003e [mc\\_resource\\_pack](#input\\_mc\\_resource\\_pack) | The resource pack for the Minecraft server | `string` | `\"\"` | no |\n| \u003ca name=\"input_mc_simulation_distance\"\u003e\u003c/a\u003e [mc\\_simulation\\_distance](#input\\_mc\\_simulation\\_distance) | The simulation distance for the Minecraft server | `number` | `12` | no |\n| \u003ca name=\"input_mc_spawn_animals\"\u003e\u003c/a\u003e [mc\\_spawn\\_animals](#input\\_mc\\_spawn\\_animals) | Whether animals spawn on the Minecraft server | `bool` | `true` | no |\n| \u003ca name=\"input_mc_spawn_monsters\"\u003e\u003c/a\u003e [mc\\_spawn\\_monsters](#input\\_mc\\_spawn\\_monsters) | Whether monsters spawn on the Minecraft server | `bool` | `true` | no |\n| \u003ca name=\"input_mc_spawn_npcs\"\u003e\u003c/a\u003e [mc\\_spawn\\_npcs](#input\\_mc\\_spawn\\_npcs) | Whether NPCs spawn on the Minecraft server | `bool` | `true` | no |\n| \u003ca name=\"input_mc_view_distance\"\u003e\u003c/a\u003e [mc\\_view\\_distance](#input\\_mc\\_view\\_distance) | The view distance for the Minecraft server | `number` | `32` | no |\n| \u003ca name=\"input_mc_whitelist_enabled\"\u003e\u003c/a\u003e [mc\\_whitelist\\_enabled](#input\\_mc\\_whitelist\\_enabled) | Whether the whitelist is enabled on the Minecraft server | `bool` | `false` | no |\n| \u003ca name=\"input_mc_whitelisted_users\"\u003e\u003c/a\u003e [mc\\_whitelisted\\_users](#input\\_mc\\_whitelisted\\_users) | A map of whitelisted users where the key is the UUID and the value is the username | \u003cpre\u003elist(object({\u003cbr\u003e    uuid = string\u003cbr\u003e    name = string\u003cbr\u003e  }))\u003c/pre\u003e | `[]` | no |\n| \u003ca name=\"input_minecraft_version\"\u003e\u003c/a\u003e [minecraft\\_version](#input\\_minecraft\\_version) | The version of Minecraft Java edition to install, if not specified the latest version will be installed | `string` | `\"\"` | no |\n| \u003ca name=\"input_notification_webhook_url\"\u003e\u003c/a\u003e [notification\\_webhook\\_url](#input\\_notification\\_webhook\\_url) | The URL of the Discord webhook to send notifications to | `string` | `\"https://webhook.site/87aba66d-bdaa-4337-85cf-7ef180f24146\"` | no |\n| \u003ca name=\"input_region\"\u003e\u003c/a\u003e [region](#input\\_region) | AWS region | `string` | `\"eu-west-2\"` | no |\n| \u003ca name=\"input_s3_save_bucket_name\"\u003e\u003c/a\u003e [s3\\_save\\_bucket\\_name](#input\\_s3\\_save\\_bucket\\_name) | The S3 bucket name to save the Minecraft server data | `string` | n/a | yes |\n| \u003ca name=\"input_s3_save_bucket_versioning\"\u003e\u003c/a\u003e [s3\\_save\\_bucket\\_versioning](#input\\_s3\\_save\\_bucket\\_versioning) | Whether to enable versioning on the S3 bucket on first creation | `string` | `\"Enabled\"` | no |\n| \u003ca name=\"input_server_port\"\u003e\u003c/a\u003e [server\\_port](#input\\_server\\_port) | The port the server will run on | `number` | `25565` | no |\n| \u003ca name=\"input_vpc_subnet_cidr_block\"\u003e\u003c/a\u003e [vpc\\_subnet\\_cidr\\_block](#input\\_vpc\\_subnet\\_cidr\\_block) | value of the vpc cidr block for the public subnet | `string` | `\"172.31.0.0/16\"` | no |\n\n## Outputs\n\n| Name | Description |\n|------|-------------|\n| \u003ca name=\"output_server_ip\"\u003e\u003c/a\u003e [server\\_ip](#output\\_server\\_ip) | public IP of the EC2 instance used for direct connect |\n\u003c!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharry-moore-dev%2Fterraform-aws-minecraft-server-module","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharry-moore-dev%2Fterraform-aws-minecraft-server-module","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharry-moore-dev%2Fterraform-aws-minecraft-server-module/lists"}