From 9649166b8f7ecd25c3157c3e947f1e2a1e32605d Mon Sep 17 00:00:00 2001 From: Zero Omar Date: Tue, 10 Dec 2024 18:48:15 +0200 Subject: [PATCH 1/5] docs: Correct typo in examples and README (#34) Co-authored-by: Omar Hisham --- README.md | 2 +- examples/complete/main.tf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 87e3035..15d99d9 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ module "opensearch" { actions = ["es:*"] - condition = [{ + conditions = [{ test = "IpAddress" variable = "aws:SourceIp" values = ["127.0.0.1/32"] diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 1cef719..7550fa3 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -142,7 +142,7 @@ module "opensearch" { actions = ["es:*"] - condition = [{ + conditions = [{ test = "IpAddress" variable = "aws:SourceIp" values = ["127.0.0.1/32"] From 111032e0f468b0201776a72dbe32e39c35e5ab1b Mon Sep 17 00:00:00 2001 From: Daiki Shiozawa Date: Sun, 26 Jan 2025 23:01:31 +0900 Subject: [PATCH 2/5] feat: Add `collection_name` to outputs (#35) --- examples/collection/README.md | 2 ++ examples/collection/outputs.tf | 10 ++++++++++ modules/collection/README.md | 1 + modules/collection/outputs.tf | 5 +++++ 4 files changed, 18 insertions(+) diff --git a/examples/collection/README.md b/examples/collection/README.md index dcd7747..d049d19 100644 --- a/examples/collection/README.md +++ b/examples/collection/README.md @@ -63,6 +63,7 @@ No inputs. | [opensearch\_collection\_private\_kms\_key\_arn](#output\_opensearch\_collection\_private\_kms\_key\_arn) | The ARN of the Amazon Web Services KMS key used to encrypt the collection | | [opensearch\_collection\_private\_lifecycle\_policy](#output\_opensearch\_collection\_private\_lifecycle\_policy) | The JSON policy document of the lifecycle policy | | [opensearch\_collection\_private\_lifecycle\_policy\_version](#output\_opensearch\_collection\_private\_lifecycle\_policy\_version) | The version of the lifecycle policy | +| [opensearch\_collection\_private\_name](#output\_opensearch\_collection\_private\_name) | Name of the collection | | [opensearch\_collection\_private\_network\_policy](#output\_opensearch\_collection\_private\_network\_policy) | The JSON policy document of the network policy | | [opensearch\_collection\_private\_network\_policy\_version](#output\_opensearch\_collection\_private\_network\_policy\_version) | The version of the network policy | | [opensearch\_collection\_public\_access\_policy](#output\_opensearch\_collection\_public\_access\_policy) | The JSON policy document of the access policy | @@ -76,6 +77,7 @@ No inputs. | [opensearch\_collection\_public\_kms\_key\_arn](#output\_opensearch\_collection\_public\_kms\_key\_arn) | The ARN of the Amazon Web Services KMS key used to encrypt the collection | | [opensearch\_collection\_public\_lifecycle\_policy](#output\_opensearch\_collection\_public\_lifecycle\_policy) | The JSON policy document of the lifecycle policy | | [opensearch\_collection\_public\_lifecycle\_policy\_version](#output\_opensearch\_collection\_public\_lifecycle\_policy\_version) | The version of the lifecycle policy | +| [opensearch\_collection\_public\_name](#output\_opensearch\_collection\_public\_name) | Name of the collection | | [opensearch\_collection\_public\_network\_policy](#output\_opensearch\_collection\_public\_network\_policy) | The JSON policy document of the network policy | | [opensearch\_collection\_public\_network\_policy\_version](#output\_opensearch\_collection\_public\_network\_policy\_version) | The version of the network policy | diff --git a/examples/collection/outputs.tf b/examples/collection/outputs.tf index 2e08c2a..df903e9 100644 --- a/examples/collection/outputs.tf +++ b/examples/collection/outputs.tf @@ -27,6 +27,11 @@ output "opensearch_collection_public_id" { value = module.opensearch_collection_public.id } +output "opensearch_collection_public_name" { + description = "Name of the collection" + value = module.opensearch_collection_public.name +} + output "opensearch_collection_public_encryption_policy_version" { description = "The version of the encryption policy" value = module.opensearch_collection_public.encryption_policy_version @@ -96,6 +101,11 @@ output "opensearch_collection_private_id" { value = module.opensearch_collection_private.id } +output "opensearch_collection_private_name" { + description = "Name of the collection" + value = module.opensearch_collection_private.name +} + output "opensearch_collection_private_encryption_policy_version" { description = "The version of the encryption policy" value = module.opensearch_collection_private.encryption_policy_version diff --git a/modules/collection/README.md b/modules/collection/README.md index dbabd26..ca71d8e 100644 --- a/modules/collection/README.md +++ b/modules/collection/README.md @@ -112,6 +112,7 @@ No modules. | [kms\_key\_arn](#output\_kms\_key\_arn) | The ARN of the Amazon Web Services KMS key used to encrypt the collection | | [lifecycle\_policy](#output\_lifecycle\_policy) | The JSON policy document of the lifecycle policy | | [lifecycle\_policy\_version](#output\_lifecycle\_policy\_version) | The version of the lifecycle policy | +| [name](#output\_name) | Name of the collection | | [network\_policy](#output\_network\_policy) | The JSON policy document of the network policy | | [network\_policy\_version](#output\_network\_policy\_version) | The version of the network policy | diff --git a/modules/collection/outputs.tf b/modules/collection/outputs.tf index c3f026a..4276481 100644 --- a/modules/collection/outputs.tf +++ b/modules/collection/outputs.tf @@ -27,6 +27,11 @@ output "id" { value = try(aws_opensearchserverless_collection.this[0].id, null) } +output "name" { + description = "Name of the collection" + value = try(aws_opensearchserverless_collection.this[0].name, null) +} + ################################################################################ # Encryption Policy ################################################################################ From 432e3866f1236f8a9b643e93b918a2c644cbeee7 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 26 Jan 2025 14:01:54 +0000 Subject: [PATCH 3/5] chore(release): version 1.6.0 [skip ci] ## [1.6.0](https://github.com/terraform-aws-modules/terraform-aws-opensearch/compare/v1.5.0...v1.6.0) (2025-01-26) ### Features * Add `collection_name` to outputs ([#35](https://github.com/terraform-aws-modules/terraform-aws-opensearch/issues/35)) ([111032e](https://github.com/terraform-aws-modules/terraform-aws-opensearch/commit/111032e0f468b0201776a72dbe32e39c35e5ab1b)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b1c0e1..cada54d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [1.6.0](https://github.com/terraform-aws-modules/terraform-aws-opensearch/compare/v1.5.0...v1.6.0) (2025-01-26) + + +### Features + +* Add `collection_name` to outputs ([#35](https://github.com/terraform-aws-modules/terraform-aws-opensearch/issues/35)) ([111032e](https://github.com/terraform-aws-modules/terraform-aws-opensearch/commit/111032e0f468b0201776a72dbe32e39c35e5ab1b)) + ## [1.5.0](https://github.com/terraform-aws-modules/terraform-aws-opensearch/compare/v1.4.1...v1.5.0) (2024-12-01) From 2a14c3fe32471c301b0892255646bf2f1ea8476b Mon Sep 17 00:00:00 2001 From: Melissa Greenbaum <69476188+magreenbaum@users.noreply.github.com> Date: Sun, 30 Mar 2025 10:19:16 -0400 Subject: [PATCH 4/5] feat: Support `aws_opensearch_domain.node_options` (#37) --- README.md | 4 ++-- examples/collection/README.md | 4 ++-- examples/collection/versions.tf | 2 +- examples/complete/README.md | 4 ++-- examples/complete/main.tf | 10 ++++++++++ examples/complete/versions.tf | 2 +- main.tf | 19 +++++++++++++++++++ modules/collection/README.md | 4 ++-- modules/collection/versions.tf | 2 +- versions.tf | 2 +- wrappers/collection/versions.tf | 2 +- wrappers/versions.tf | 2 +- 12 files changed, 43 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 15d99d9..401c756 100644 --- a/README.md +++ b/README.md @@ -144,13 +144,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.64 | +| [aws](#requirement\_aws) | >= 5.90 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.64 | +| [aws](#provider\_aws) | >= 5.90 | ## Modules diff --git a/examples/collection/README.md b/examples/collection/README.md index d049d19..002384d 100644 --- a/examples/collection/README.md +++ b/examples/collection/README.md @@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.54 | +| [aws](#requirement\_aws) | >= 5.90 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.54 | +| [aws](#provider\_aws) | >= 5.90 | ## Modules diff --git a/examples/collection/versions.tf b/examples/collection/versions.tf index cfe9e2d..0f77646 100644 --- a/examples/collection/versions.tf +++ b/examples/collection/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.54" + version = ">= 5.90" } } } diff --git a/examples/complete/README.md b/examples/complete/README.md index 316041c..bf7fbdd 100644 --- a/examples/complete/README.md +++ b/examples/complete/README.md @@ -26,13 +26,13 @@ Note that this example may create resources which will incur monetary charges on | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.54 | +| [aws](#requirement\_aws) | >= 5.90 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.54 | +| [aws](#provider\_aws) | >= 5.90 | ## Modules diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 7550fa3..f35b4bb 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -64,6 +64,16 @@ module "opensearch" { dedicated_master_type = "c6g.large.search" instance_type = "r6g.large.search" + node_options = { + coordinator = { + node_config = { + enabled = true + count = 3 + type = "m6g.large.search" + } + } + } + zone_awareness_config = { availability_zone_count = 3 } diff --git a/examples/complete/versions.tf b/examples/complete/versions.tf index cfe9e2d..0f77646 100644 --- a/examples/complete/versions.tf +++ b/examples/complete/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.54" + version = ">= 5.90" } } } diff --git a/main.tf b/main.tf index e656235..3fbd3a1 100644 --- a/main.tf +++ b/main.tf @@ -105,6 +105,25 @@ resource "aws_opensearch_domain" "this" { warm_enabled = try(cluster_config.value.warm_enabled, null) warm_type = try(cluster_config.value.warm_type, null) + dynamic "node_options" { + for_each = try(cluster_config.value.node_options, []) + + content { + + dynamic "node_config" { + for_each = try([node_options.value.node_config], []) + + content { + count = try(node_config.value.count, null) + enabled = try(node_config.value.enabled, true) + type = try(node_config.value.type, null) + } + } + + node_type = try(node_options.value.node_type, node_options.key, null) + } + } + dynamic "zone_awareness_config" { for_each = try(cluster_config.value.zone_awareness_enabled, true) ? try([cluster_config.value.zone_awareness_config], []) : [] diff --git a/modules/collection/README.md b/modules/collection/README.md index ca71d8e..1c9ea93 100644 --- a/modules/collection/README.md +++ b/modules/collection/README.md @@ -42,13 +42,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.0 | -| [aws](#requirement\_aws) | >= 5.54 | +| [aws](#requirement\_aws) | >= 5.90 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | >= 5.54 | +| [aws](#provider\_aws) | >= 5.90 | ## Modules diff --git a/modules/collection/versions.tf b/modules/collection/versions.tf index cfe9e2d..0f77646 100644 --- a/modules/collection/versions.tf +++ b/modules/collection/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.54" + version = ">= 5.90" } } } diff --git a/versions.tf b/versions.tf index 264f62f..0f77646 100644 --- a/versions.tf +++ b/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.64" + version = ">= 5.90" } } } diff --git a/wrappers/collection/versions.tf b/wrappers/collection/versions.tf index cfe9e2d..0f77646 100644 --- a/wrappers/collection/versions.tf +++ b/wrappers/collection/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.54" + version = ">= 5.90" } } } diff --git a/wrappers/versions.tf b/wrappers/versions.tf index 264f62f..0f77646 100644 --- a/wrappers/versions.tf +++ b/wrappers/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.64" + version = ">= 5.90" } } } From 6f7113edebb53779de7225634f7e914bc6d59c8c Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 30 Mar 2025 14:19:41 +0000 Subject: [PATCH 5/5] chore(release): version 1.7.0 [skip ci] ## [1.7.0](https://github.com/terraform-aws-modules/terraform-aws-opensearch/compare/v1.6.0...v1.7.0) (2025-03-30) ### Features * Support `aws_opensearch_domain.node_options` ([#37](https://github.com/terraform-aws-modules/terraform-aws-opensearch/issues/37)) ([2a14c3f](https://github.com/terraform-aws-modules/terraform-aws-opensearch/commit/2a14c3fe32471c301b0892255646bf2f1ea8476b)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cada54d..7b494fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. +## [1.7.0](https://github.com/terraform-aws-modules/terraform-aws-opensearch/compare/v1.6.0...v1.7.0) (2025-03-30) + + +### Features + +* Support `aws_opensearch_domain.node_options` ([#37](https://github.com/terraform-aws-modules/terraform-aws-opensearch/issues/37)) ([2a14c3f](https://github.com/terraform-aws-modules/terraform-aws-opensearch/commit/2a14c3fe32471c301b0892255646bf2f1ea8476b)) + ## [1.6.0](https://github.com/terraform-aws-modules/terraform-aws-opensearch/compare/v1.5.0...v1.6.0) (2025-01-26)