-
Notifications
You must be signed in to change notification settings - Fork 28
/
main.tf
96 lines (90 loc) · 2.4 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
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
###############
## Variables ##
###############
# Target VPC config
variable "vpc_id" {
description = "ID of target VPC."
}
variable "vpc_region" {
description = "Region of the target VPC"
}
variable "vpc_private_subnets" {
description = "Comma separated list of private subnet ip address ranges."
}
variable "vpc_private_subnet_ids" {
description = "Comma separated list of private subnet ids."
}
# Server config
variable "server_name" {
description = "Name of the Rancher server. Best not to include non-alphanumeric characters."
}
variable "server_hostname" {
description = "Hostname of the Rancher server."
}
variable "server_key" {
description = "Public key file for the Rancher server instance."
}
variable "server_subnet_id" {
description = "Public subnet id in which to place the rancher server instance."
}
variable "server_version" {
description = "Rancher server version ton install."
}
variable "server_instance_type" {
description = "EC2 instance type to use for the rancher server."
default = "t2.micro"
}
variable "server_ami" {
description = "Amazon Linux AMI id for the target region."
default = {
eu-west-1 = "ami-f9dd458a"
eu-central-1 = "ami-ea26ce85"
us-west-1 = "ami-31490d51"
us-west-2 = "ami-7172b611"
us-east-1 = "ami-6869aa05"
ap-northeast-1 = "ami-374db956"
ap-northeast-2 = "ami-2b408b45"
ap-south-1 = "ami-ffbdd790"
ap-southeast-1 = "ami-a59b49c6"
ap-southeast-2 = "ami-dc361ebf"
sa-east-1 = "ami-6dd04501"
}
}
variable "server_root_volume_type" {
default = "gp2"
}
variable "server_root_volume_size" {
default = "64"
}
variable "server_root_volume_delete_on_terminate" {
default = true
}
# SSL
variable "ssl_email" {
description = "E-Mail address to use for Lets Encrypt account."
}
# Database
variable "database_address" {
description = "Database server address."
}
variable "database_port" {
description = "Database port."
default = "3306"
}
variable "database_name" {
description = "Database name."
default = "rancherserverdb"
}
variable "database_username" {
description = "Database username."
default = "root"
}
variable "database_password" {
description = "Database password."
}
##################
## Misc outputs ##
##################
output "server_hostname" {
value = "${var.server_hostname}"
}