-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
106 lines (95 loc) · 3.23 KB
/
variables.tf
File metadata and controls
106 lines (95 loc) · 3.23 KB
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
variable "postgres_version" {
type = string
default = "17"
description = "Postgres Engine Version"
}
variable "instance_class" {
type = string
default = "db.t3.micro"
description = <<EOF
Available Instance Classes: https://aws.amazon.com/rds/instance-types/
T = Burstable (can utilize full CPU/memory for short periods of time)
M = General-Purpose
R/X/Z = Memory-Optimized
EOF
}
variable "allocated_storage" {
type = number
default = 10
description = <<EOF
The storage in GiB to reserve for the RDS instance.
If max_allocated_storage is enabled, this argument represents the initial storage allocation.
While auto-scaling is enabled, changes to allocated_storage are ignored.
EOF
}
variable "max_allocated_storage" {
type = number
default = 0
description = <<EOF
This sets the maximum amount of storage in GiB that autoscaling will increase the RDS instance storage.
Auto-scaling is *only* enabled if max_allocated_storage > allocated_storage.
When enabled, allocated_storage is only used for setting the initial storage size.
EOF
}
variable "backup_retention_period" {
type = number
default = 5
description = "The number of days that each backup is retained"
}
variable "high_availability" {
type = bool
default = false
description = <<EOF
Enables high availability and failover support on the database instance.
By default, this is disabled. It is recommended to enable this in production environments.
In dev environments, it is best to turn off to save on costs.
EOF
}
variable "enforce_ssl" {
type = bool
default = false
description = <<EOF
By default, the postgres cluster will have SSL enabled.
This toggle will require an SSL connection.
This is highly recommended if you have public access enabled.
EOF
}
variable "enable_public_access" {
type = bool
default = false
description = <<EOF
By default, the postgres cluster is not accessible to the public.
If you want to access your database, we recommend using a bastion instead.
However, this is necessary for scenarios like connecting from a Heroku app.
EOF
}
variable "custom_postgres_params" {
type = map(string)
default = {}
description = <<EOF
This is a dictionary of parameters to custom-configure the RDS postgres instance.
For a list of parameters, see https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.Parameters.html
EOF
}
variable "auto_upgrade_minor" {
type = bool
default = true
description = <<EOF
Whether or not to automatically upgrade minor versions of the database.
These upgrades are performed during the maintenance window (See `maintenance_window` variable).
EOF
}
variable "maintenance_window" {
type = string
default = "Sat:03:00-Sat:03:30"
description = <<EOF
A weekly time interval in which to performance maintenance (e.g. minor version upgrades, patches, etc.).
This window is configured using UTC time zone.
Syntax: "ddd:hh24:mi-ddd:hh24:mi"
Example: "Mon:00:00-Mon:03:00"
See [RDS Maintenance Window docs](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_UpgradeDBInstance.Maintenance.html#AdjustingTheMaintenanceWindow) for more information.
EOF
}
locals {
port = 5432
}