Skip to content

Commit

Permalink
fix: fix secret name template (dvsa/olcs-selfserve#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaLicense authored Mar 15, 2024
1 parent 6df11f8 commit a34530b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion app/selfserve/config/autoload/config-parameter.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@

$environment = getenv('ENVIRONMENT_NAME');

// This logic will be moved to environment variables with the migration to ECS.
$isProduction = strtoupper($environment) === 'APP';
$isProductionAccount = in_array(strtoupper($environment), ['INT', 'PP', 'APP']);

$providers = [];

if (!empty($environment)) {
// The `int` environment is actually `nduint` in AWS Secrets Manager.
$secretsManagerEnvironmentName = ($environment === 'int' ? 'nduint' : $environment);

$providers = [
SecretsManager::class => [
sprintf('DEVAPP%s-BASE-SM-APPLICATION-SELFSERVE', strtoupper($environment)),
sprintf('%sAPP%s-BASE-SM-APPLICATION-SELFSERVE', ($isProductionAccount ? "" : "DEV"), ($isProduction ? "" : strtoupper($secretsManagerEnvironmentName))),
],
ParameterStore::class => [
sprintf('/applicationparams/%s/', strtolower($environment)),
Expand Down
2 changes: 1 addition & 1 deletion app/selfserve/config/autoload/config.global.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
],

// The domain value needed to delete GA cookies
'google-ga-domain' => '.ssweb.%domain%',
'google-ga-domain' => '.%olcs_ss_cookie%',

'cache-encryption' => [
'node_suffix' => 'ssweb',
Expand Down

0 comments on commit a34530b

Please sign in to comment.