Hi, I’m having the same issue some people is having trying to do terraform apply -target=module.transform_job at the begining of the project.
I tried everything, even waiting for the whole platform to expire after 3 hours and tried again. I applied modules individually, commenting the data_quality part and as a whole, destroying and apply again. Nothing worked.
Somehow terraform doesn’t recognize the db was already created by LakeFormation? of course I cannot see the db to manually delete it and doesn’t allow me to create a new one because is already there.
Hello @citadel
Can you please try the following and see if it fixes the issue?
Go to AWS Glue, select Databases from the menu on the left, select the de_c4w4a2_transform_db database, and press delete.
Please, note that I took this screenshot from another lab. So, in your case, the database you need to delete has another name.
Before the form I tried again this morning with the same results but I remembered something that could be the problem. The first time I run terraform apply -target=module.extract_job the VSCode terminal crashes half way through (inconsistent tf state?) The second time I’ve go the “Database already exist”.
What I did after that is to alter the env var TF_VAR_catalog_database=de_c4w4a2_transform_db_2 and run the apply again. The apply finished correctly but the job didn’t:
Hello @citadel
The error is probably because the other parts of the project are programmed to look for the de_c4w4a2_transform_db database. You created a database with another name so the Glue jobs are not able to find it.
I have reported this issue. In the meantime, I hope the lab refresh fixes the problem.