Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5f8ad6b
initial commit
Apr 18, 2025
6175b85
inital commit
Apr 21, 2025
8e76aef
Merge branch 'main' into issue-12003
aatreyee2506 Apr 21, 2025
d9e8d04
Merge branch 'main' into issue-12003
aatreyee2506 Apr 27, 2025
83cc13b
Merge branch 'main' into issue-12003
aatreyee2506 Apr 28, 2025
f1e4c61
Merge branch 'main' into issue-12003
aatreyee2506 May 8, 2025
2007c09
Merge branch 'main' into issue-12003
aatreyee2506 May 12, 2025
8416d6b
fixes
May 12, 2025
0104363
Merge branch 'main' into issue-12003
aatreyee2506 May 14, 2025
2a807c7
Merge branch 'main' into issue-12003
Ak-sky May 29, 2025
b3fd5c7
added resource_block to create secrets
Jun 4, 2025
ffbda00
Merge remote-tracking branch 'origin/issue-12003' into issue-12003
aatreyee257 Jun 4, 2025
6916606
added support for existin secret
aatreyee257 Jun 4, 2025
912fddd
fixed logic
aatreyee257 Jun 4, 2025
a8bcf52
changes
aatreyee257 Jun 5, 2025
ce29449
changes
aatreyee257 Jun 5, 2025
860e5ee
fixed error
aatreyee257 Jun 10, 2025
f677083
Merge branch 'main' into issue-12003
aatreyee257 Jun 12, 2025
461cce1
added condition and updated provider version
aatreyee257 Jun 12, 2025
ad0bcca
provider version update
aatreyee257 Jun 16, 2025
9f09893
changes
aatreyee257 Jun 23, 2025
601e8a0
Merge branch 'main' into issue-12003
aatreyee257 Jun 24, 2025
2cb1fe4
feat: Full DA refactor (#428)
whoffler Jun 27, 2025
7e6ffab
changes
aatreyee257 Jul 2, 2025
ebe833f
Merge branch 'main' of https://github.com/terraform-ibm-modules/terra…
aatreyee257 Jul 2, 2025
ceeefa5
Merge branch 'main' into issue-12003
shemau Jul 4, 2025
2581334
fix: update secrets baseline
shemau Jul 4, 2025
e7b35d4
Merge branch 'main' into issue-12003
aatreyee257 Jul 6, 2025
3ae026b
Merge branch 'main' into issue-12003
aatreyee257 Jul 6, 2025
74b6b84
Merge branch 'main' into issue-12003
aatreyee257 Jul 7, 2025
c262b0d
Merge branch 'main' into issue-12003
aatreyee257 Jul 14, 2025
8dbcf05
resolved comments
aatreyee257 Jul 14, 2025
455fe44
fixed test failure
aatreyee257 Jul 15, 2025
02331e4
Merge branch 'main' into issue-12003
aatreyee257 Jul 22, 2025
3e9c24f
Merge branch 'main' of https://github.com/terraform-ibm-modules/terra…
aatreyee257 Jul 23, 2025
ed61e9d
fixes
aatreyee257 Jul 23, 2025
9055dbd
Merge branch 'main' into issue-12003
aatreyee257 Jul 28, 2025
13055b3
Merge branch 'main' into issue-12003
aatreyee257 Jul 30, 2025
c04820a
fix error for secrets
Ak-sky Jul 31, 2025
3461c68
fix error for secrets
Ak-sky Jul 31, 2025
fb98339
baseline
Ak-sky Jul 31, 2025
ff20c5d
baseline
Ak-sky Jul 31, 2025
5a5f705
updated logic for image secret
Ak-sky Jul 31, 2025
e23c23e
Merge branch 'main' into issue-12003
Ak-sky Aug 4, 2025
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 .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"files": "go.sum|^.secrets.baseline$",
"lines": null
},
"generated_at": "2025-07-24T21:11:38Z",
"generated_at": "2025-07-31T19:33:02Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
Expand Down Expand Up @@ -110,7 +110,7 @@
"hashed_secret": "8c7c51db5075ebd0369c51e9f14737d9b4c1c21d",
"is_secret": false,
"is_verified": false,
"line_number": 380,
"line_number": 379,
"type": "Base64 High Entropy String",
"verified_result": null
}
Expand Down
18 changes: 18 additions & 0 deletions ibm_catalog.json
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@
{
"key": "existing_code_engine_project_id"
},
{
"key": "use_existing_registry_secret"
},
{
"key": "kibana_registry_namespace_image"
},
Expand All @@ -442,6 +445,21 @@
{
"key": "kibana_image_port"
},
{
"key": "kibana_image_secret"
},
{
"key": "kibana_registry_personal_access_token"
},
{
"key": "kibana_registry_server"
},
{
"key": "kibana_registry_username"
},
{
"key": "use_private_registry"
},
{
"key": "kibana_visibility",
"options": [
Expand Down
27 changes: 20 additions & 7 deletions solutions/fully-configurable/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -432,19 +432,32 @@ module "code_engine_kibana" {
resource_group_id = module.resource_group.resource_group_id
project_name = local.code_engine_project_name
existing_project_id = local.code_engine_project_id
secrets = {
"es-secret" = {
format = "generic"
data = {
"ELASTICSEARCH_PASSWORD" = local.admin_pass
secrets = merge(
{
"es-secret" = {
format = "generic"
data = {
"ELASTICSEARCH_PASSWORD" = local.admin_pass
}
}
}
}
},
var.use_private_registry && !var.use_existing_registry_secret ? {
"registry-secret" = {
format = "registry"
data = {
username = var.kibana_registry_username
password = var.kibana_registry_personal_access_token
server = var.kibana_registry_server
}
}
} : {}
)

apps = {
(local.code_engine_app_name) = {
image_reference = var.kibana_image_digest != null ? "${var.kibana_registry_namespace_image}@${var.kibana_image_digest}" : "${var.kibana_registry_namespace_image}:${local.kibana_version}"
image_port = var.kibana_image_port
image_secret = var.use_private_registry ? (var.use_existing_registry_secret ? var.kibana_image_secret : "registry-secret") : null
run_env_variables = [{
type = "literal"
name = "ELASTICSEARCH_HOSTS"
Expand Down
61 changes: 59 additions & 2 deletions solutions/fully-configurable/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,12 @@ variable "admin_pass_secrets_manager_secret_name" {
}
}

variable "use_existing_registry_secret" {
description = "Set to true to use an existing image registry secret instead of creating a new one."
type = bool
default = false
}

##############################################################
# Kibana Configuration
##############################################################
Expand Down Expand Up @@ -471,12 +477,31 @@ variable "enable_kibana_dashboard" {
default = false
}

variable "use_private_registry" {
description = "Set to true if the Kibana image is being pulled from a private registry."
type = bool
default = false
}

variable "kibana_registry_namespace_image" {
type = string
description = "The Kibana image reference in the format of `[registry-url]/[namespace]/[image]`. This value is used only when `enable_kibana_dashboard` is set to true."
default = "docker.elastic.co/kibana/kibana"
}

variable "kibana_registry_server" {
type = string
description = "The server URL of the container registry used to pull the Kibana image."
default = "https://index.docker.io/v1/"
validation {
condition = (
!(var.use_private_registry && !var.use_existing_registry_secret)
|| (var.kibana_registry_server != null && var.kibana_registry_server != "")
)
error_message = "The `kibana_registry_server` must not be null or empty when `use_private_registry` is true and `use_existing_registry_secret` is false."
}
}

variable "kibana_image_digest" {
type = string
description = "When `enable_kibana_dashboard` is set to true, Kibana is deployed using an image tag compatible with the Elasticsearch version. Alternatively, an image digest in the format `sha256:xxxxx...` can also be specified but it must correspond to a version compatible with the Elasticsearch instance."
Expand All @@ -485,15 +510,20 @@ variable "kibana_image_digest" {
condition = var.kibana_image_digest == null || can(regex("^sha256:", var.kibana_image_digest))
error_message = "If provided, the value of kibana_image_digest must start with 'sha256:'."
}


}

variable "kibana_image_port" {
description = "Specify the port number used to connect to the Kibana service exposed by the container image. Default port is 5601 and it is only applicable if `enable_kibana_dashboard` is true"
type = number
default = 5601
}

variable "kibana_image_secret" {
description = "The name of the image registry access secret."
type = string
default = null
}

variable "kibana_visibility" {
description = "Specify the visibility of Kibana application in order to define which endpoint is available for receiving the requests. Valid values are 'local_public', 'local_private' and 'local' and it is only applicable if `enable_kibana_dashboard` is true. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-icd-elasticsearch/blob/main/solutions/fully-configurable/DA-types.md#options-for-kibana_visibility)."
type = string
Expand All @@ -504,6 +534,33 @@ variable "kibana_visibility" {
}
}

variable "kibana_registry_username" {
description = "Username for the for the container registry."
type = string
default = null
validation {
condition = (
!(var.use_private_registry && !var.use_existing_registry_secret)
|| (var.kibana_registry_username != null && var.kibana_registry_username != "")
)
error_message = "The `kibana_registry_username` must not be null or empty when `use_private_registry` is true and `use_existing_registry_secret` is false."
}
}

variable "kibana_registry_personal_access_token" {
description = "Pesonal access token for the container registry."
type = string
default = null
sensitive = true
validation {
condition = (
!(var.use_private_registry && !var.use_existing_registry_secret)
|| (var.kibana_registry_personal_access_token != null && var.kibana_registry_personal_access_token != "")
)
error_message = "The `kibana_registry_personal_access_token` must not be null or empty when `use_private_registry` is true and `use_existing_registry_secret` is false."
}
}

##############################################################
# Context-based restriction (CBR)
##############################################################
Expand Down
1 change: 0 additions & 1 deletion tests/pr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ func TestRunFullyConfigurableSolutionSchematics(t *testing.T) {
},
},
}

options.TerraformVars = []testschematic.TestSchematicTerraformVar{
{Name: "ibmcloud_api_key", Value: options.RequiredEnvironmentVars["TF_VAR_ibmcloud_api_key"], DataType: "string", Secure: true},
{Name: "access_tags", Value: permanentResources["accessTags"], DataType: "list(string)"},
Expand Down