forked from JKolios/minecraft-ondemand-terraform
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.tf
42 lines (37 loc) · 1.1 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
terraform {
required_version = ">= 1.0"
required_providers {
aws = {
version = "~> 4.0"
}
}
}
resource "aws_route53_zone" "minecraft" {
name = "example.com"
}
module "minecraft_common" {
source = "./base"
route53_zone_id = aws_route53_zone.minecraft.id
ssh_pub_key = "your ssh pub key here"
cluster_name = "minecraft"
}
module "minecraft_server1" {
source = "./server"
name = "minecraft"
# sns_notification_emails = ["[email protected]"]
minecraft_version = "1.17.1"
server_type = "PAPER"
ops = "your_mc_username_here"
# Check the env variables that are available here:
# https://github.com/itzg/docker-minecraft-server/blob/master/README.md
extra_envs = {
SPAWN_PROTECTION = "0"
MOTD = "My awesome server!!"
}
route53_zone_id = aws_route53_zone.minecraft.id
efs_id = module.minecraft_common.efs_id
subnet_ids = module.minecraft_common.subnet_ids
ecs_sg_id = module.minecraft_common.ecs_sg_id
cluster_name = "minecraft"
cluster_arn = module.minecraft_common.cluster_arn
}