How to create databases, users and grants with terraform mysql and output the created credentials?
To ensure separation and use in other environments, make sure to have an outputs file and set each password as an output.  TF Output Docs.  I haven't done much with for each as it was just released last time I used terraform.  I would imagine a way to iterate over passwords and assign them as outputs.

once you have the output set for the module, I would then have my consuming terraform put those values in a password vault of some kind.  You can use Azure's Key Vault.  TF Azure Key Vault, or any other solution.  Just ensure that the ops team has access to the destination.  This way there isn't anything introduced between when/where the keys are generated and them being stored, reducing the chance for human error.