I am wanting to get the *`SecretString` value from...
# typescript
g
I am wanting to get the
SecretString
value from AWS Secrets Manager. I'm using the AWS providers
aws.secretsmanager.getSecretOutput
and am able to retrieve the secret object with all it's metadata, but not the JSON of the secret string that I need. I am considering using the
aws-sdk
but would have thought this is something Pulumi could do for me?
b
@green-bird-4706
getSecret
returns the secret itself, you actually need `getSecretVersion`: https://www.pulumi.com/registry/packages/aws/api-docs/secretsmanager/getsecretversion/
that’ll return the data
it’s a weird naming convention by AWS
(it’s because secretsmanager keeps lots of copies of secrets)
g
Thanks. I always though
getSecretsVersion
would give me a number of the version, like 1, 2 or 3 😂 . I didn't even bother to try it 😳