Skip to content

Commit

Permalink
fix: prefix duplication due to updated Code Engine DA outputs (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
huayuenh authored Aug 29, 2024
1 parent 0035c08 commit 9b5588d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions code-engine/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ locals {
ci_code_engine_project = (var.ci_code_engine_project == "") ? var.code_engine_project : var.ci_code_engine_project
cd_code_engine_project = (var.cd_code_engine_project == "") ? var.code_engine_project : var.cd_code_engine_project

ci_code_engine_project_name = (var.prefix == "") ? local.ci_code_engine_project : format("${var.prefix}-%s", local.ci_code_engine_project)
cd_code_engine_project_name = (var.prefix == "") ? local.cd_code_engine_project : format("${var.prefix}-%s", local.cd_code_engine_project)
ci_code_engine_project_name = ((var.prefix != "") && (var.add_code_engine_prefix)) ? format("${var.prefix}-%s", local.ci_code_engine_project) : local.ci_code_engine_project
cd_code_engine_project_name = ((var.prefix != "") && (var.add_code_engine_prefix)) ? format("${var.prefix}-%s", local.cd_code_engine_project) : local.cd_code_engine_project

ci_toolchain_name = (var.ci_toolchain_name == "") ? format("${var.toolchain_name}%s", "-CI-Toolchain") : var.ci_toolchain_name
cd_toolchain_name = (var.cd_toolchain_name == "") ? format("${var.toolchain_name}%s", "-CD-Toolchain") : var.cd_toolchain_name
Expand Down
6 changes: 6 additions & 0 deletions code-engine/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3943,3 +3943,9 @@ variable "add_container_name_suffix" {
description = "Set to `true` to add a random suffix to the specified ICR name."
default = false
}

variable "add_code_engine_prefix" {
type = bool
description = "Set to `true` to use `prefix` to add a prefix to the code engine project names."
default = true
}
7 changes: 7 additions & 0 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -4605,6 +4605,13 @@
"description": "Set to `true` to add a random suffix to the specified ICR name.",
"required": false
},
{
"key": "add_code_engine_prefix",
"type": "boolean",
"default_value": true,
"description": "Set to `true` to use `prefix` to add a prefix to the code engine project names.",
"required": false
},
{
"key": "prefix",
"type": "string",
Expand Down

0 comments on commit 9b5588d

Please sign in to comment.