From f230f49ddcd6f6c91211e6426e92a27598e76082 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sindri=20Gu=C3=B0mundsson?= Date: Mon, 19 Feb 2024 08:23:25 +0100 Subject: [PATCH] feat: Add support for auto software update (#31) --- README.md | 2 ++ main.tf | 4 ++++ variables.tf | 7 +++++++ 3 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 0c22d1c..5f1fd07 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,8 @@ No modules. | [vpc](#input\_vpc) | VPC ID | `string` | `""` | no | | [create_default_sg](#input\_create_default_sg) | Creates default security group if value is true | `bool` | `true` | no | | [zone\_id](#input\_zone\_id) | Route 53 Zone id. | `string` | `""` | no | +| [auto\_software\_update\_enabled](#input\_auto\_software\_update\_enabled) | Whether automatic service software updates are enabled for the domain. Defaults to false. | `bool` | `false` | no | + ## Outputs diff --git a/main.tf b/main.tf index 5ab2a22..581fcd1 100644 --- a/main.tf +++ b/main.tf @@ -97,6 +97,10 @@ resource "aws_opensearch_domain" "opensearch" { } } + software_update_options { + auto_software_update_enabled = var.auto_software_update_enabled + } + cluster_config { instance_type = var.instance_type dedicated_master_enabled = try(var.cluster_config["dedicated_master_enabled"], false) diff --git a/variables.tf b/variables.tf index 21a034a..422dafb 100644 --- a/variables.tf +++ b/variables.tf @@ -301,3 +301,10 @@ variable "off_peak_window_start_time" { description = "Time for the 10h update window to begin. If you don't specify a window start time, AWS will default it to 10:00 P.M. local time." default = null } + +variable "auto_software_update_enabled" { + type = bool + + description = "Whether automatic service software updates are enabled for the domain. Defaults to false." + default = false +}