From 813dc50c27cdfa43acede73937e651b7b0d8209f Mon Sep 17 00:00:00 2001 From: "Dennis J. Bell" Date: Thu, 8 Aug 2024 10:35:02 -0700 Subject: [PATCH] Added missing credhub root path to credhub connection env [Bug Fixes] * Added missing credhub root path when the `genesis.bosh_env` is set in the environment YAML file. This resolves the `uninitialized value in concatenation` error when reading or writing credhub secrets. --- lib/Genesis/Env.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Genesis/Env.pm b/lib/Genesis/Env.pm index 16aef1a0..92522107 100644 --- a/lib/Genesis/Env.pm +++ b/lib/Genesis/Env.pm @@ -1212,6 +1212,8 @@ sub credhub_connection_env { "director login credentials" ) unless $bosh_vault && $bosh_vault->connect_and_validate; } + $env{GENESIS_CREDHUB_EXODUS_SOURCE} = "$bosh_alias/$bosh_dep_type"; + $env{GENESIS_CREDHUB_ROOT}=sprintf("/%s-%s/%s-%s", $bosh_alias, $bosh_dep_type, $self->name, $self->type); $credhub_info = $bosh_vault->get("$bosh_exodus_mount/$bosh_alias/$bosh_dep_type"); } else { $env{GENESIS_CREDHUB_EXODUS_SOURCE_OVERRIDE} =