bumpy-summer-9075
07/06/2021, 11:29 PMRandomPassword
to generate a password, and then I use bcrypt to store the hash in my nginx configuration. Like so:
this.basicAuthPassword = new RandomPassword('basic-auth-password', {
length: 40,
special: false,
});
const passwordHash = this.basicAuthPassword.result.apply((password) => {
return hashSync(password);
});
unfortunately the hash generated changes every time because bcrypt generates a random hash. How can I deal with this with pulumi?little-cartoon-10569
07/06/2021, 11:31 PMbumpy-summer-9075
07/06/2021, 11:35 PMlittle-cartoon-10569
07/06/2021, 11:50 PMbumpy-summer-9075
07/06/2021, 11:51 PMMyResourceProviderOutputs
interface is not used anywhere and I can't see how the MyResource
class properties are set)
2. What would be the best way to share this provider with the community? A published npm
package?little-cartoon-10569
07/08/2021, 11:16 PMpulumi.Output<string>
.bumpy-summer-9075
07/09/2021, 12:00 AMbetter-shampoo-48884
07/14/2021, 10:59 AMmyElasticAdminPass.result.apply(async (pass) => {
console.log("Starting salt generation")
const salt = bcrypt.genSaltSync(10, "a")
console.log("Salt generation complete, starting hashing")
const bcryptPass = bcrypt.hashSync(pass, salt);
console.log("hashing complete.")
const myElasticUsersSecret = new k8s.core.v1.Secret(`${args.infra.regions[region].config.nodeName}-myElasticFileRealmSecrets`, {
metadata:{
name: "my-elastic-file-realm-secrets"
},
stringData: {
users: `
${myElasticAdminUser}:${bcryptPass}
`,
users_roles: `
superuser:${myElasticAdminUser}
admin:${myElasticAdminUser}
`
}
},{
provider: monitoringProvider,
dependsOn: eckOperator,
parent: this
})
}