Skip to content

Commit

Permalink
Add Cognito Options into Opensearch
Browse files Browse the repository at this point in the history
  • Loading branch information
zainhasib committed Apr 8, 2024
1 parent 84bd206 commit 6471f49
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ resource "aws_opensearch_domain" "this" {
}
}

cognito_options {
enabled = var.enable_cognito
identity_pool_id = var.cognito_identity_pool_id
role_arn = var.cognito_role_arn
user_pool_id = var.cognito_user_id_pool
}

vpc_options {
subnet_ids = var.subnet_ids
security_group_ids = var.security_group_ids
Expand Down
24 changes: 24 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,30 @@ variable "master_user_password" {
default = ""
}

variable "enable_cognito" {
description = "Whether Amazon Cognito authentication with Dashboard is enabled or not."
type = bool
default = false
}

variable "cognito_identity_pool_id" {
description = "ID of the Cognito Identity Pool to use."
type = string
default = ""
}

variable "cognito_role_arn" {
description = "ARN of the IAM role that has the AmazonOpenSearchServiceCognitoAccess policy attached."
type = string
default = ""
}

variable "cognito_user_id_pool" {
description = "ID of the Cognito User Pool to use."
type = string
default = ""
}

variable "master_instance_enabled" {
description = "Indicates whether dedicated master nodes are enabled for the cluster."
type = bool
Expand Down

0 comments on commit 6471f49

Please sign in to comment.