https://pulumi.com logo
#general
Title
# general
g

gentle-application-59272

02/13/2024, 11:08 AM
without that I think I need to do something like
Copy code
const 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
Copy code
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?