Skip to content

Commit e6be02d

Browse files
author
Thomas Loubrieu
committed
add variable to force recreation of the opensearch database, false by default
1 parent 2284340 commit e6be02d

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

terraform/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ data "aws_caller_identity" "current" {}
77
# OpenSearch Serverless Collection Module
88
module "opensearch" {
99
source = "./opensearch_serverless"
10+
count = var.recreate_opensearch ? 1 : 0
1011

1112
component_name = "registry"
1213
collection_name = var.collection_name

terraform/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
variable "recreate_opensearch" {
2+
description = "When true, the opensearch_serverless module is called to create/update the OpenSearch collection. Set to false to skip OpenSearch provisioning and reuse an existing collection."
3+
type = bool
4+
default = false
5+
}
6+
17
variable "aws_region" {
28
description = "AWS region for resources"
39
type = string

0 commit comments

Comments
 (0)