Im trying to provision a service on ECS using Terraform. I have secrets in AWS Secrets Manager:
{
"test": "secret"
}
and provide them to my task definition as follows:
....
"secrets": ${jsonencode(
[
{
name = "test_1",
valueFrom = "arn:aws:secretsmanager:....../test"
}
]
....
When I deploy my container, it complains that ResourceNotFoundException: Secrets Manager can't find the specified secret
, which makes sense, because such an ARN does not exist. If I drop /test
on the end, however, I get test_1 = {"test": "secret"}
in my environment, which is ok but not what I want - I want just secret
. Thats how it works in examples that I have seen, like for instance here - https://www.chakray.com/creating-fargate-ecs-task-aws-using-terraform/
What am I missing?