Skip to content

Commit 7881435

Browse files
authored
feat: allow the default name for the kibana code engine project and app to be override using new DA inputs: kibana_code_engine_new_project_name and kibana_code_engine_new_app_name (#422)
1 parent 4281fc3 commit 7881435

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

ibm_catalog.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,12 @@
351351
{
352352
"key": "enable_kibana_dashboard"
353353
},
354+
{
355+
"key": "kibana_code_engine_new_project_name"
356+
},
357+
{
358+
"key": "kibana_code_engine_new_app_name"
359+
},
354360
{
355361
"key": "existing_code_engine_project_id"
356362
},

solutions/standard/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ module "secrets_manager_service_credentials" {
435435

436436
locals {
437437
code_engine_project_id = var.existing_code_engine_project_id != null ? var.existing_code_engine_project_id : null
438-
code_engine_project_name = local.code_engine_project_id != null ? null : (var.prefix != null && var.prefix != "") ? "${var.prefix}-code-engine-kibana-project" : "ce-kibana-project"
439-
code_engine_app_name = (var.prefix != null && var.prefix != "") ? "${var.prefix}-kibana-app" : "ce-kibana-app"
438+
code_engine_project_name = local.code_engine_project_id != null ? null : (var.prefix != null && var.prefix != "") ? "${var.prefix}-${var.kibana_code_engine_new_project_name}" : var.kibana_code_engine_new_project_name
439+
code_engine_app_name = (var.prefix != null && var.prefix != "") ? "${var.prefix}-${var.kibana_code_engine_new_app_name}" : var.kibana_code_engine_new_app_name
440440
kibana_version = var.enable_kibana_dashboard ? jsondecode(data.http.es_metadata[0].response_body).version.number : null
441441
}
442442

solutions/standard/variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,18 @@ variable "admin_pass_secrets_manager_secret_name" {
350350
# Kibana Configuration
351351
##############################################################
352352

353+
variable "kibana_code_engine_new_project_name" {
354+
type = string
355+
description = "The Code Engine project name. If a prefix input variable is specified, the prefix is added to the name in the `<prefix>-<name>` format."
356+
default = "ce-kibana-project"
357+
}
358+
359+
variable "kibana_code_engine_new_app_name" {
360+
type = string
361+
description = "The Code Engine application name. If a prefix input variable is specified, the prefix is added to the name in the `<prefix>-<name>` format."
362+
default = "ce-kibana-app"
363+
}
364+
353365
variable "existing_code_engine_project_id" {
354366
type = string
355367
description = "Existing code engine project ID to deploy Kibana. If no value is passed, a new code engine project will be created."

0 commit comments

Comments
 (0)