-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
139 lines (118 loc) · 3.8 KB
/
variables.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
variable "aws_access_key" {
description = "AWS Access Key for AWS provider"
type = string
sensitive = true
}
variable "aws_secret_key" {
description = "AWS Secret Key for AWS provider"
type = string
sensitive = true
}
variable "aws_region" {
description = "Region where to create the resources, choose one with cheap EC2 Spot prices"
type = string
default = "us-east-2"
}
variable "subnet_az" {
description = "Specific availability zone where to create the subnet, instance, EBS volumes and other VPC resources"
type = string
default = "us-east-2a"
}
variable "name" {
description = "Short name to identify created resources. To be safe, only 15 characters or less, alphanumeric character and spaces"
type = string
default = "Minecraft Server"
}
variable "discord_app_id" {
default = "Discord App ID for webhook API usage"
type = string
}
variable "discord_app_public_key" {
description = "Discord App public key for webhook validation"
type = string
}
variable "discord_bot_token" {
description = "Discord App bot token for interaction message updates"
type = string
sensitive = true
}
variable "duckdns_domain" {
description = "The name of the subdomain (not the full hostname/URL) registered in Duck DNS"
type = string
}
variable "duckdns_token" {
description = "Duck DNS token"
type = string
sensitive = true
}
variable "duckdns_interval" {
description = "Interval for the shell script to update the IP. Shouldn't matter much"
type = string
default = "5m"
}
variable "extra_ingress_rules" {
description = "Ingress rules to add to the instance security group, required if a plugin requires a specific port open"
type = map(object({
description = string
from_port = number
to_port = number
ip_protocol = string
cidr_ipv4 = string
}))
default = {}
}
variable "instance_key_pair_name" {
description = "Name of the EC2 Key Pair used to SSH into the instance"
type = string
default = "minecraft-spot-discord"
}
// ssh-keygen -t ed25519 -C "Minecraft Server"
variable "instance_key_pair_public_key" {
description = "Public key of the EC2 Key Pair used to SSH into the instance"
type = string
}
variable "instance_timezone" {
description = "Custom timezone for the instance OS set via cloud-init. See timedatectl"
type = string
default = ""
}
variable "instance_type" {
description = "Instance type for the EC2 Spot Instance. See https://instances.vantage.sh/?min_memory=2&min_vcpus=1®ion=us-east-2&cost_duration=daily"
type = string
default = "t4g.large"
}
variable "minecraft_data_volume_size" {
description = "The size, in GB of the EBS volume storing the Minecraft server"
type = number
default = 10
}
variable "minecraft_compose_service_top_level_elements" {
description = "Override/add other elements to the Minecraft server compose service"
type = map(any)
default = {}
}
variable "minecraft_port" {
description = "Main Minecraft port, if you change this, you must change the related variables too"
type = number
default = 25565
}
variable "minecraft_compose_ports" {
description = "See https://docker-minecraft-server.readthedocs.io/en/latest/#using-docker-compose"
type = set(string)
default = ["25565:25565"]
}
variable "minecraft_compose_environment" {
description = "See https://docker-minecraft-server.readthedocs.io/en/latest/variables"
type = map(string)
default = {
"INIT_MEMORY" : "6100M"
"MAX_MEMORY" : "6100M"
}
}
variable "minecraft_compose_limits" {
description = "See https://docs.docker.com/compose/compose-file/deploy/#resources"
type = map(string)
default = {
memory : "7400mb"
}
}