Hello,
If I add a JSON string as a variable in my manifest the deployment fails:
variables:
HASURA_GRAPHQL_JWT_SECRET: "{}"
Results in Model validation failed ("#/ContainerDefinitions/0/Environment/8/Value: expected type: String, found: JSONObject".)
I tried to escape the JSON, but the result is the same.
Where is the expected type taken from? Can I specify it?
copilot version: v0.2.0
macOS 10.15.4 (19E287)
Best regards,
Benedikt
Hi @BenediktMiller!
I can also reproduce the error while deploying the service:

It looks like it's because the CFN template that's generated from the manifest does not escape the JSON object itself.
In the mean time to mitigate, one option could be to store the JSON object as a secret in SSM like mentioned in https://github.com/aws/copilot-cli/issues/1291 and I think that should unblock you until we fix the bug.
Sorry for the inconvenience 🙇♂️
The workaround works for me, thank you😃
Related #1120
Most helpful comment
Hi @BenediktMiller!
I can also reproduce the error while deploying the service:

It looks like it's because the CFN template that's generated from the manifest does not escape the JSON object itself.
In the mean time to mitigate, one option could be to store the JSON object as a secret in SSM like mentioned in https://github.com/aws/copilot-cli/issues/1291 and I think that should unblock you until we fix the bug.
Sorry for the inconvenience 🙇♂️