File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,20 @@ resource "google_redis_instance" "main" {
77 region = var. region
88 name = var. name
99
10- memory_size_gb = 1
10+ redis_version = var. version
11+
12+ memory_size_gb = var. memory
1113
1214 authorized_network = var. network
1315 connect_mode = " PRIVATE_SERVICE_ACCESS"
1416
1517 auth_enabled = true
1618
19+ persistence_config {
20+ persistence_mode = var. persistence_mode
21+ rdb_snapshot_period = var. persistence_period
22+ }
23+
1724 depends_on = [
1825 google_project_service . redis ,
1926 ]
Original file line number Diff line number Diff line change @@ -34,3 +34,23 @@ variable "cluster" {
3434variable "network" {
3535 type = string
3636}
37+
38+ variable "version" {
39+ type = string
40+ default = " REDIS_7_2"
41+ }
42+
43+ variable "memory" {
44+ type = number
45+ default = 1
46+ }
47+
48+ variable "persistence_mode" {
49+ type = string
50+ default = " DISABLED"
51+ }
52+
53+ variable "persistence_period" {
54+ type = string
55+ default = null
56+ }
You can’t perform that action at this time.
0 commit comments