Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.64 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.90 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.64 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.90 |

## Modules

Expand Down
4 changes: 2 additions & 2 deletions examples/collection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.54 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.90 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.54 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.90 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion examples/collection/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.54"
version = ">= 5.90"
}
}
}
4 changes: 2 additions & 2 deletions examples/complete/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ Note that this example may create resources which will incur monetary charges on
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.54 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.90 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.54 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.90 |

## Modules

Expand Down
10 changes: 10 additions & 0 deletions examples/complete/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ module "opensearch" {
dedicated_master_type = "c6g.large.search"
instance_type = "r6g.large.search"

node_options = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is quite right, did we try deploying this?

I think its:

    node_options = {
      node_type = "coordinator"
      node_config = {
        enabled = true
        count   = 3
        type    = "m6g.large.search"
      }
    }

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to deploy it successfully. It looked like node_options is a list that could pass more than one set of options in the future (right now there's only coordinator) so I made it accept either the key or a value in the list called node_type. But I can change it if that seems unlikely.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, lets try this

coordinator = {
node_config = {
enabled = true
count = 3
type = "m6g.large.search"
}
}
}

zone_awareness_config = {
availability_zone_count = 3
}
Expand Down
2 changes: 1 addition & 1 deletion examples/complete/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.54"
version = ">= 5.90"
}
}
}
19 changes: 19 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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, null)
type = try(node_config.value.type, null)
}
}

node_type = try(node_options.key, node_options.value.node_type, null)
}
}

dynamic "zone_awareness_config" {
for_each = try(cluster_config.value.zone_awareness_enabled, true) ? try([cluster_config.value.zone_awareness_config], []) : []

Expand Down
4 changes: 2 additions & 2 deletions modules/collection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.54 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.90 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.54 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.90 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/collection/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.54"
version = ">= 5.90"
}
}
}
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.64"
version = ">= 5.90"
}
}
}
2 changes: 1 addition & 1 deletion wrappers/collection/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.54"
version = ">= 5.90"
}
}
}
2 changes: 1 addition & 1 deletion wrappers/versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.64"
version = ">= 5.90"
}
}
}