sparse-intern-71089
10/18/2021, 3:30 AMlittle-cartoon-10569
10/18/2021, 3:44 AMdamp-ram-18047
10/18/2021, 5:54 AMimport * as random from '@pulumi/random';
export const dbPassword =
config.get('dbPassword') || genRandomPassword('dbPasswordGen', 8);
function genRandomPassword(
name: string,
length: number,
): pulumi.Output<string> {
return new random.RandomString(name, {
upper: false,
number: true,
special: true,
length: length,
}).result;
}
damp-ram-18047
10/18/2021, 8:09 AMgcp:sql:User
in stack resource, but the password length doesn’t match (genRandomPassword('dbPasswordGen', 8);
)damp-ram-18047
10/18/2021, 8:11 AMgcp:sql:User
detail looks like
{
"__meta": "{\"..."}",
"host": "",
"id": "gcp-project-name//db-name",
"instance": "web-db",
"name": "username",
"password": {
"4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxd": "1xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0",
"ciphertext": "Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx7"
},
"project": "gcp-project-name",
"type": ""
}