-
Notifications
You must be signed in to change notification settings - Fork 0
/
variables-rds.tf
137 lines (114 loc) · 3.5 KB
/
variables-rds.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
# File auto-generated by ./bin/make-example-vars
variable "rds_name" {
description = "Name of the RDS instance"
type = string
}
variable "rds_engine" {
description = "Engine type for RDS instance"
type = string
default = "postgres"
validation {
condition = contains(["postgres", "mysql"], var.rds_engine)
error_message = "Invalid RDS engine: ${var.rds_engine}."
}
}
variable "rds_db_name" {
description = "Name of the RDS database. Uses rds_name if not specified."
type = string
default = null
}
variable "rds_username" {
description = "Username of the RDS database. Use rds_db_name if not specified."
type = string
default = null
}
variable "rds_password" {
description = "Username of the RDS database. Set it to null to let RDS manage the password via SecretsManager."
type = string
default = null
}
variable "rds_storage_size" {
description = "Initial size in Gi for allocated storage. Will grow up to 5x this value."
type = number
default = 20
}
variable "rds_engine_version" {
description = "RDS engine version."
type = string
default = "14"
}
variable "rds_family" {
description = "RDS family."
type = string
default = "postgres14" # DB parameter group
}
variable "rds_major_engine_version" {
description = "RDS major engine version."
type = string
default = "14"
}
variable "rds_instance_class" {
description = "RDS instance class."
type = string
default = "db.t4g.large"
}
variable "rds_public" {
description = "Creates RDS on a public subnet for internet access"
type = bool
default = false
}
variable "rds_vpc_name" {
description = "VPC name for the RDS. Will use rds_name if not specified."
type = string
default = null
}
variable "rds_vpc_cidr" {
description = "CIDR for the RDS VPC"
type = string
default = "10.99.0.0/24"
}
#variable "rds_eks_vpc_cidr" {
# description = "Allow CIDR from EKS VPC to access RDS."
# type = string
# default = null
#}
variable "rds_ingress_vpc_cidrs" {
description = "Append CIDRs to allow ingress access to RDS. Defaults to EKS's CIDR only."
type = list(string)
default = []
}
variable "rds_vpc_zones" {
description = "AZ names to create the subnets. Use 'aws ec2 describe-availability-zones --region <region> | jq .AvailabilityZones[].ZoneName' to list all available subnets."
type = list(string)
default = []
}
variable "rds_deletion_protection" {
description = "Enable accidental deletion protection for the database."
type = bool
default = true
}
#variable "rds_vpc_peering_peer_vpc_id" {
# description = "VPC ID for the peering (client-side) to consume this RDS."
# type = string
# default = null
#}
#variable "rds_vpc_peering_peer_route_table_ids" {
# description = "VPC route table IDs for the peering (client-side) to consume this RDS."
# type = list(string)
# default = []
#}
variable "performance_insights_enabled" {
description = "Specifies whether Performance Insights are enabled."
type = bool
default = true
}
variable "performance_insights_retention_period" {
description = "The amount of time in days to retain Performance Insights data. Valid values are 7, 731 (2 years) or a multiple of 31."
type = number
default = 7
}
variable "rds_tags" {
description = "(Optional) Tags to apply to all resources."
type = any
default = {}
}