Skip to content

Manifest Environment Variables for Array #4907

Answered by Lou1415926
Kqirk asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @Kqirk 👋🏼 I can confirm that non-array env vars aren't supported in the manifest yet.

A short explanation - ⬇️ is not working because ${SECURITY_GROUPS} is recognized as a string first, before Copilot even tries to read it as an env var. This causes failure to unmarshal, because security_groups as a YAML field is expecting slice of strings or compose-style map.

network:
  vpc:
    security_groups: ${SECURITY_GROUPS}

This is an interesting case that you raised, perhaps Copilot should support non-string env vars types.

For now, I think you probably do need to write it as ⬇️ unfortunately : (

security_groups:
  -${sg_1}
  -${sg_2}

I understand that the number of SGs might differ across…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@Kqirk
Comment options

@Lou1415926
Comment options

Answer selected by Kqirk
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants