trying to get a secret from `aws.secretsmanager` b...
# general
e
trying to get a secret from
aws.secretsmanager
but the documentation has me confused on how I actually pass the secret into my resource. Anybody have an example?
w
When you say "get a secret" - what did you have in mind exactly?
e
Mike had helped me a bit in a separate channel, but the following is the code I have...
Copy code
const adSecret = pulumi.output(aws.secretsmanager.getSecret({
  name: 'ad/password',
}));

const adPassword = adSecret.id.apply(id =>
    aws.secretsmanager.getSecretVersion({
      secretId: id,
    })
);

const adPasswordString = adPassword.secretString.apply(passwd => 
  {
    return JSON.parse(`${passwd}`).Password;
  }
 );
I don't know how to properly store the password into a variable to use later