forked from darrelldavis/terraform-aws-minecraft
-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables.tf
131 lines (110 loc) · 3.1 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
variable "vpc_id" {
description = "VPC for security group"
type = string
default = ""
}
variable "subnet_id" {
description = "VPC subnet id to place the instance"
type = string
default = ""
}
variable "key_name" {
description = "EC2 key name for provisioning and access"
type = string
default = ""
}
variable "bucket_name" {
description = "Bucket name for persisting minecraft world"
type = string
default = ""
}
variable "bucket_force_destroy" {
description = "A boolean that indicates all objects should be deleted from the bucket so that the bucket can be destroyed without error. This will destroy your minecraft world!"
type = bool
default = false
}
variable "bucket_object_versioning" {
description = "Enable object versioning (default = true). Note this may incur more cost."
type = bool
default = true
}
// For tags
variable "name" {
description = "Name to use for servers, tags, etc (e.g. minecraft)"
type = string
default = "minecraft"
}
variable "namespace" {
description = "Namespace, which could be your organization name or abbreviation, e.g. 'eg' or 'cp'"
type = string
default = "games"
}
variable "environment" {
description = "Environment, e.g. 'prod', 'staging', 'dev', 'pre-prod', 'UAT'"
type = string
default = "games"
}
variable "tags" {
description = "Any extra tags to assign to objects"
type = map
default = {}
}
// Minecraft-specific defaults
variable "mc_port" {
description = "TCP port for minecraft"
type = number
default = 25565
}
variable "mc_root" {
description = "Where to install minecraft on your instance"
type = string
default = "/home/minecraft"
}
variable "mc_version" {
description = "Which version of minecraft to install"
type = string
default = "latest"
}
variable "mc_type" {
description = "Type of minecraft distribution - snapshot or release"
type = string
default = "release"
}
variable "mc_backup_freq" {
description = "How often (mins) to sync to S3"
type = number
default = 5
}
// You'll want to tune these next two based on the instance type
variable "java_ms_mem" {
description = "Java initial and minimum heap size"
type = string
default = "2G"
}
variable "java_mx_mem" {
description = "Java maximum heap size"
type = string
default = "2G"
}
// Instance vars
variable "associate_public_ip_address" {
description = "By default, our server has a public IP"
type = bool
default = true
}
variable "ami" {
description = "AMI to use for the instance - will default to latest Ubuntu"
type = string
default = ""
}
// https://aws.amazon.com/ec2/instance-types/
variable "instance_type" {
description = "EC2 instance type/size - the default is not part of free tier!"
type = string
default = "t2.medium"
}
variable "allowed_cidrs" {
description = "Allow these CIDR blocks to the server - default is the Universe"
type = string
default = "0.0.0.0/0"
}