Hello, I’m looking for a Pulumi example of how to ...
# typescript
n
Hello, I’m looking for a Pulumi example of how to pass a secret (at the moment it’s a pulumi secret) to a ECS Fargate Task container secrets, so I can inject passwords in a secure way. Would you be able to point me to some relevant documentation / resources?
c
you can create a AWS secrets manager resource and then reference the arn of that resource in your fargate task definition
Copy code
"secrets": [
        {
          "name": "DATABASE_PASSWORD",
          "valueFrom": "arn:aws:secretsmanager:us-east-1:awsExampleAccountID:parameter/awsExampleParameter"
        }
      ]
n
Cheers Mike. That’s helpful 🙂
👍 1
l
FYI Pulumi secrets are only secret between where they're persisted, and your code. Once your code puts them somewhere, they're unencrypted. Generally solutions like Mike's are the way to go: the secret is secret in AWS's storage and used by AWS services.
n
That makes sense and was my understanding (thank you for clarifying though 🙂 )
and it turned out to be dead easy to set it as ssm parameter, so now I know how to solve it seems obvious
👍 1