Yoo Matsuo
Yoo Matsuo

Reputation: 2363

AWS CodeCommit buildspec, is it possible to use an environmental variable for a secrets manager key?

In my buildspec.yaml, I want to use an environmental variable, for example, "$ASPNETCORE_ENVIRONMENT", for a key of secrets manager. Also, I want to convert a value of the environment variable to upper case.

I tried the following, but it says

[Container] 2023/06/28 07:14:34 Phase context status code: Secrets Manager Error Message: ValidationException: Invalid name. Must be a valid name containing alphanumeric characters, or any of the following: -/_+=.@!

env:
  secrets-manager:
    VAR_NAME: "SOMEHING_${ASPNETCORE_ENVIRONMENT^^}:VAR_NAME"

Any help would be appreciated.

Upvotes: 0

Views: 76

Answers (0)

Related Questions