Skip to content

Commit dff3f63

Browse files
authored
feat: Add standby_replicas to serverless collection and auto_tune_options.use_off_peak_window to domain (#2)
1 parent e81748b commit dff3f63

File tree

13 files changed

+30
-19
lines changed

13 files changed

+30
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
144144
| Name | Version |
145145
|------|---------|
146146
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
147-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.24 |
147+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
148148

149149
## Providers
150150

151151
| Name | Version |
152152
|------|---------|
153-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.24 |
153+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.40 |
154154

155155
## Modules
156156

examples/collection/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which will incur monetary charges on
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.24 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.24 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.40 |
3030

3131
## Modules
3232

examples/collection/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ locals {
2525
module "opensearch_collection_public" {
2626
source = "../../modules/collection"
2727

28-
name = "${local.name}-public"
29-
description = "Example public OpenSearch Serverless collection"
30-
type = "SEARCH"
28+
name = "${local.name}-public"
29+
description = "Example public OpenSearch Serverless collection"
30+
type = "SEARCH"
31+
standby_replicas = "DISABLED"
3132

3233
create_access_policy = true
3334
create_network_policy = true

examples/collection/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.24"
7+
version = ">= 5.40"
88
}
99
}
1010
}

examples/complete/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Complete AWS OpenSearch Example
22

3-
Configuration in this directory creates an AWS OpenSEarch domain and resources
3+
Configuration in this directory creates an AWS OpenSearch domain and resources
44

55
## Usage
66

@@ -26,13 +26,13 @@ Note that this example may create resources which will incur monetary charges on
2626
| Name | Version |
2727
|------|---------|
2828
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
29-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.24 |
29+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
3030

3131
## Providers
3232

3333
| Name | Version |
3434
|------|---------|
35-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.24 |
35+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.40 |
3636

3737
## Modules
3838

examples/complete/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.24"
7+
version = ">= 5.40"
88
}
99
}
1010
}

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ resource "aws_opensearch_domain" "this" {
7979
}
8080

8181
rollback_on_disable = try(auto_tune_options.value.rollback_on_disable, null)
82+
use_off_peak_window = try(auto_tune_options.value.use_off_peak_window, null)
8283
}
8384
}
8485

modules/collection/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ Examples codified under the [`examples`](https://github.com/terraform-aws-module
4242
| Name | Version |
4343
|------|---------|
4444
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
45-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.24 |
45+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.40 |
4646

4747
## Providers
4848

4949
| Name | Version |
5050
|------|---------|
51-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.24 |
51+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.40 |
5252

5353
## Modules
5454

@@ -92,6 +92,7 @@ No modules.
9292
| <a name="input_network_policy"></a> [network\_policy](#input\_network\_policy) | Network policy to apply to the collection | `any` | `{}` | no |
9393
| <a name="input_network_policy_description"></a> [network\_policy\_description](#input\_network\_policy\_description) | Description of the network policy | `string` | `null` | no |
9494
| <a name="input_network_policy_name"></a> [network\_policy\_name](#input\_network\_policy\_name) | Name of the network policy | `string` | `null` | no |
95+
| <a name="input_standby_replicas"></a> [standby\_replicas](#input\_standby\_replicas) | Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED. | `string` | `null` | no |
9596
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | `{}` | no |
9697
| <a name="input_timeouts"></a> [timeouts](#input\_timeouts) | Create and delete timeout configurations for the collection | `map(string)` | `{}` | no |
9798
| <a name="input_type"></a> [type](#input\_type) | Type of collection. One of `SEARCH`, `TIMESERIES`, or `VECTORSEARCH`. Defaults to `TIMESERIES` | `string` | `null` | no |

modules/collection/main.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ locals {
1313
resource "aws_opensearchserverless_collection" "this" {
1414
count = var.create ? 1 : 0
1515

16-
description = var.description
17-
name = var.name
18-
type = var.type
16+
description = var.description
17+
name = var.name
18+
type = var.type
19+
standby_replicas = var.standby_replicas
1920

2021
tags = local.tags
2122

modules/collection/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ variable "type" {
3232
default = null
3333
}
3434

35+
variable "standby_replicas" {
36+
description = "Indicates whether standby replicas should be used for a collection. One of ENABLED or DISABLED. Defaults to ENABLED."
37+
type = string
38+
default = null
39+
}
40+
3541
variable "timeouts" {
3642
description = "Create and delete timeout configurations for the collection"
3743
type = map(string)

modules/collection/versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.24"
7+
version = ">= 5.40"
88
}
99
}
1010
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.24"
7+
version = ">= 5.40"
88
}
99
}
1010
}

wrappers/collection/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module "wrapper" {
2626
network_policy = try(each.value.network_policy, var.defaults.network_policy, {})
2727
network_policy_description = try(each.value.network_policy_description, var.defaults.network_policy_description, null)
2828
network_policy_name = try(each.value.network_policy_name, var.defaults.network_policy_name, null)
29+
standby_replicas = try(each.value.standby_replicas, var.defaults.standby_replicas, null)
2930
tags = try(each.value.tags, var.defaults.tags, {})
3031
timeouts = try(each.value.timeouts, var.defaults.timeouts, {})
3132
type = try(each.value.type, var.defaults.type, null)

0 commit comments

Comments
 (0)