Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allows setting a description for the maintenance policy #272

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ module "memorystore" {
| enable\_apis | Flag for enabling redis.googleapis.com in your project | `bool` | `true` | no |
| labels | The resource labels to represent user provided metadata. | `map(string)` | `null` | no |
| 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 |
| 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 |
| 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 |
| memory\_size\_gb | Redis memory size in GiB. Defaulted to 1 GiB | `number` | `1` | no |
| name | The ID of the instance or a fully qualified identifier for the instance. | `string` | n/a | yes |
| 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 |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ resource "google_redis_instance" "default" {
dynamic "maintenance_policy" {
for_each = var.maintenance_policy != null ? [var.maintenance_policy] : []
content {
description = maintenance_policy.value["description"]
weekly_maintenance_window {
day = maintenance_policy.value["day"]
start_time {
Expand Down
3 changes: 2 additions & 1 deletion variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ variable "maintenance_policy" {
description = "The maintenance policy for an instance."
# type = object(any)
type = object({
day = string
description = optional(string)
day = string
start_time = object({
hours = number
minutes = number
Expand Down
Loading