gentle-application-59272
02/13/2024, 11:08 AMconst salt = new random.RandomString("random", {
length: 22,
special: false,
keepers: {
password
}
});
const hash = salt.apply(salt => bcrypt.hashSync(password, salt))
which only works because bcrypt accepts salt.
I'd much prefer somtehing like
const hash = new pulumi.cachedCallback('my_hash', {
callback: () => bcrypt.hashSync(password, 10), // always generates a new seed
keepers: { password }
})
Following on from that question, do we have any resource that can persist arbitrary data to state, for use in future runs?