-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvariables.tf
70 lines (58 loc) · 1.63 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
variable "default_region" {
description = "The default region to deploy resources"
type = string
default = "eu-north-1"
}
variable "nr_az" {
description = "Number of Availability Zones to use"
type = number
default = 2
}
variable "vpc_name" {
description = "Name of the VPC"
type = string
default = "3-tier-vpc"
}
variable "vpc_cidr" {
description = "CIDR block for the VPC"
type = string
default = "10.0.0.0/16"
}
variable "web_instance_type" {
description = "EC2 instance type for the web tier instances"
type = string
default = "t3.micro"
validation {
condition = can(regex("^t[0-9]+\\.(micro|small)$", var.web_instance_type))
error_message = "Instance type must be from the T family and either micro or small."
}
}
variable "app_instance_type" {
description = "EC2 instance type for the application tier instances"
type = string
default = "t3.small"
validation {
condition = can(regex("^t[0-9]+\\.(micro|small)$", var.app_instance_type))
error_message = "Instance type must be from the T family and either micro or small."
}
}
variable "db_name" {
description = "Name of the RDS database"
type = string
default = "demo-db"
}
variable "db_username" {
description = "Username for the RDS database"
type = string
default = "admin"
}
variable "rds_engine" {
description = "RDS engine configuration"
type = map(string)
default = {
engine = "mysql"
engine_version = "8.0.35"
family = "mysql8.0"
major_engine_version = "8.0"
}
}