Skip to content

Conversation

@selfsimilar
Copy link

In the unlikely (but definitely encountered) event that multiple ENV variables share the same bref-ssm: parameter, prior to this fix, only the first declared ENV variable would be replaced. Subsequent ENV variables would contain the bref-ssm:/example token.

This simple fix is to iterate over $envVarsToDecrypt instead of $parameters, since there's no guarantee of a 1:1 relationship.

The biggest change is a refactor to the tests. I had to slot the new test before test throws a clear error message on missing permissions() because I couldn't get SOME_VARIABLE=bref-ssm:/app/test to clear before running the next test. I spent some time trying to clear the set ENV variables (setenv('SOME_VARIABLE');) but that didn't seem to help. Regardless, the tests run clean now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant