Skip to content

Commit e2519d4

Browse files
authored
feat: allows setting a description for the maintenance policy (#272)
1 parent 5b45c8d commit e2519d4

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ module "memorystore" {
5151
| enable\_apis | Flag for enabling redis.googleapis.com in your project | `bool` | `true` | no |
5252
| labels | The resource labels to represent user provided metadata. | `map(string)` | `null` | no |
5353
| location\_id | The zone where the instance will be provisioned. If not provided, the service will choose a zone for the instance. For STANDARD\_HA tier, instances will be created across two zones for protection against zonal failures. If [alternativeLocationId] is also provided, it must be different from [locationId]. | `string` | `null` | no |
54-
| maintenance\_policy | The maintenance policy for an instance. | <pre>object({<br> day = string<br> start_time = object({<br> hours = number<br> minutes = number<br> seconds = number<br> nanos = number<br> })<br> })</pre> | `null` | no |
54+
| maintenance\_policy | The maintenance policy for an instance. | <pre>object({<br> description = optional(string)<br> day = string<br> start_time = object({<br> hours = number<br> minutes = number<br> seconds = number<br> nanos = number<br> })<br> })</pre> | `null` | no |
5555
| memory\_size\_gb | Redis memory size in GiB. Defaulted to 1 GiB | `number` | `1` | no |
5656
| name | The ID of the instance or a fully qualified identifier for the instance. | `string` | n/a | yes |
5757
| persistence\_config | The Redis persistence configuration parameters. https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#persistenceconfig | <pre>object({<br> persistence_mode = string<br> rdb_snapshot_period = string<br> })</pre> | `null` | no |

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ resource "google_redis_instance" "default" {
4747
dynamic "maintenance_policy" {
4848
for_each = var.maintenance_policy != null ? [var.maintenance_policy] : []
4949
content {
50+
description = maintenance_policy.value["description"]
5051
weekly_maintenance_window {
5152
day = maintenance_policy.value["day"]
5253
start_time {

variables.tf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ variable "maintenance_policy" {
135135
description = "The maintenance policy for an instance."
136136
# type = object(any)
137137
type = object({
138-
day = string
138+
description = optional(string)
139+
day = string
139140
start_time = object({
140141
hours = number
141142
minutes = number

0 commit comments

Comments
 (0)