0

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.

Yoo Matsuo
  • 2,361
  • 2
  • 28
  • 41
  • 1
    Using env variables works in buildspec. I guess that your issue is with ^^ signs that you put... Also, for me it works without quote signs, like this DB_PORT: ${DB_ENV_NAME}/db_access:port – Caldazar Jun 28 '23 at 09:10
  • I ended up using a plain text string instead of an env param. Anyway, thank you for your comment. – Yoo Matsuo Jul 04 '23 at 06:46

0 Answers0