Skip to content

Commit

Permalink
Enable master user and password option (#47)
Browse files Browse the repository at this point in the history
Co-authored-by: abhinavkumarsph <[email protected]>
  • Loading branch information
ianuragsingh and abhinavkumarsph authored Jul 10, 2024
1 parent e32465a commit 5c11222
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ repos:
- id: shellcheck

- repo: https://github.com/tcort/markdown-link-check
rev: v3.12.1
rev: v3.12.2
hooks:
- id: markdown-link-check
args:
- "--config=mlc_config.json"

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.89.0
rev: v1.92.0
hooks:
- id: terraform_fmt
- id: terraform_providers_lock
Expand Down
2 changes: 1 addition & 1 deletion .tflint.hcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugin "aws" {
enabled = true
version = "0.23.1"
version = "0.32.0"
source = "github.com/terraform-linters/tflint-ruleset-aws"
}

Expand Down
4 changes: 0 additions & 4 deletions examples/ingestion/providers.tf
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
provider "aws" {
region = "ap-southeast-1"
}

provider "awscc" {
region = "ap-southeast-1"
}
6 changes: 4 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ resource "aws_opensearch_domain" "this" {
#checkov:skip=CKV2_AWS_52
#checkov:skip=CKV_AWS_248:Ensure that Elasticsearch is not using the default Security Group
#checkov:skip=CKV_AWS_317:Ensure Elasticsearch Domain Audit Logging is enabled
#checkov:skip=CKV_AWS_318:Ensure Elasticsearch domains are configured with at least three dedicated master nodes for HA

# service linked role must exist and default cloudwatch log_group created.
depends_on = [
aws_iam_service_linked_role.aos,
Expand Down Expand Up @@ -60,8 +62,8 @@ resource "aws_opensearch_domain" "this" {

master_user_options {
master_user_arn = (!var.internal_user_database_enabled && var.master_user_arn != "") ? var.master_user_arn : null
master_user_name = (var.internal_user_database_enabled && var.master_user_arn == "") ? var.master_user_name : null
master_user_password = (var.internal_user_database_enabled && var.master_user_arn == "") ? var.master_user_password : null
master_user_name = (var.internal_user_database_enabled && var.master_user_name != "") ? var.master_user_name : null
master_user_password = (var.internal_user_database_enabled && var.master_user_password != "") ? var.master_user_password : null
}
}

Expand Down

0 comments on commit 5c11222

Please sign in to comment.