can you please share the main tf file and variable file in which you are passing the DB parameters
the error says you main tf file which is used for creation unable to find the variable, which might be either not declared properly or might be variable names are not matching.
You can remove provide details , key if you have any in the tf scripts and share them.