Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 solutions/standard/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ locals {

admin_pass = var.admin_pass == null ? random_password.admin_password[0].result : var.admin_pass
admin_pass_secret = [{
secret_group_name = var.prefix != null ? "${var.prefix}-${var.admin_pass_sm_secret_group}" : var.admin_pass_sm_secret_group
secret_group_name = var.prefix != null && var.admin_pass_sm_secret_group != null ? "${var.prefix}-${var.admin_pass_sm_secret_group}" : var.admin_pass_sm_secret_group
existing_secret_group = var.use_existing_admin_pass_sm_secret_group
secrets = [{
secret_name = var.prefix != null ? "${var.prefix}-${var.admin_pass_sm_secret_name}" : var.admin_pass_sm_secret_name
secret_name = var.prefix != null && var.admin_pass_sm_secret_name != null ? "${var.prefix}-${var.admin_pass_sm_secret_name}" : var.admin_pass_sm_secret_name
secret_type = "arbitrary"
secret_payload_password = local.admin_pass
}
Expand Down
4 changes: 2 additions & 2 deletions solutions/standard/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ variable "skip_es_sm_auth_policy" {
variable "admin_pass_sm_secret_group" {
type = string
description = "The name of a new or existing secrets manager secret group for admin password. To use existing secret group, `use_existing_admin_pass_sm_secret_group` must be set to `true`. If a prefix input variable is specified, the prefix is added to the name in the `<prefix>-<name>` format."
default = null
default = "elasticsearch-secrets"
}

variable "use_existing_admin_pass_sm_secret_group" {
Expand All @@ -313,5 +313,5 @@ variable "use_existing_admin_pass_sm_secret_group" {
variable "admin_pass_sm_secret_name" {
type = string
description = "The name of a new elasticsearch administrator secret. If a prefix input variable is specified, the prefix is added to the name in the `<prefix>-<name>` format."
default = null
default = "elasticsearch-admin-password"
}