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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
variable "identifier" {
description = "RDS instance identifier"
type = string
}
variable "engine_version" {
description = "PostgreSQL engine version"
type = string
default = "16.3"
}
variable "instance_class" {
description = "RDS instance class"
type = string
default = "db.t3.medium"
}
variable "allocated_storage" {
description = "Initial allocated storage in GiB"
type = number
default = 20
}
variable "max_allocated_storage" {
description = "Maximum storage for autoscaling (0 disables)"
type = number
default = 100
}
variable "db_name" {
description = "Initial database name"
type = string
}
variable "username" {
description = "Master username"
type = string
default = "postgres"
}
variable "password" {
description = "Master password (ignored when manage_master_user_password = true)"
type = string
default = null
sensitive = true
}
variable "manage_master_user_password" {
description = "Let RDS manage the master password in Secrets Manager"
type = bool
default = true
}
variable "subnet_group_name" {
description = "DB subnet group name (created when subnet_ids is provided)"
type = string
default = null
}
variable "subnet_ids" {
description = "Subnet IDs for the DB subnet group"
type = list(string)
default = []
}
variable "security_group_ids" {
description = "Security group IDs for the RDS instance"
type = list(string)
}
variable "multi_az" {
description = "Enable Multi-AZ deployment"
type = bool
default = true
}
variable "kms_key_id" {
description = "KMS key ARN for storage encryption"
type = string
default = null
}
variable "backup_retention_period" {
description = "Days to retain automated backups"
type = number
default = 7
}
variable "backup_window" {
description = "Preferred backup window (UTC)"
type = string
default = "03:00-04:00"
}
variable "maintenance_window" {
description = "Preferred maintenance window"
type = string
default = "sun:05:00-sun:06:00"
}
variable "deletion_protection" {
description = "Enable deletion protection"
type = bool
default = true
}
variable "skip_final_snapshot" {
description = "Skip final snapshot on deletion"
type = bool
default = false
}
variable "monitoring_interval" {
description = "Enhanced monitoring interval in seconds (0 disables)"
type = number
default = 60
}
variable "performance_insights_enabled" {
description = "Enable Performance Insights"
type = bool
default = true
}
variable "performance_insights_kms_key_id" {
description = "KMS key for Performance Insights encryption"
type = string
default = null
}
variable "parameter_group_family" {
description = "DB parameter group family"
type = string
default = "postgres16"
}
variable "parameters" {
description = "Map of DB parameter names to values"
type = map(string)
default = {}
}
variable "read_replicas" {
description = "Map of read replica logical names to instance class"
type = map(string)
default = {}
}
variable "tags" {
description = "Resource tags to apply to all resources"
type = map(string)
default = {}
}
|