In the final lab assignment for INTRODUCTION TO DATA ENGINEERING course for WEEK 4, while following the step for creating vector database whenever I type command “terraform apply” I get error “The terminal process “/usr/bin/bash” terminated with exit code:1”. I have tried to do this in different browsers and in incognito mode but i am getting the same error always.
This is an issue with existing AWS resources that might get fixed after a new lab session (2hours). After you restart I suggest you delete the terraform folder and use get latest version to recreate it:
Afterwards your lab is fresh again from the start. Then you should run steps 1.6 to 1.11 to create a new job and run it. If there is any issue in this part you could ask for a lab refresh and wait 2-3 business days.
In part 2.4 that you got stuck useterraform apply -no-color 2> errors.txt to find any errors (existing resources). You could try to delete those resources manually.
When you update the lab with to Get latest version in case you want to start over it wiill not replace/overwrite any of your files. To have any effect you need to delete permanently or move the files into a new folder before continuing.
If you try to Reboot to restart the AWS session, you might get issues with terraform and that could be fixed after a new lab session (couple of hours). You will notice it since it may take up to 12 minutes for your lab to start once you have reloaded it.
Finally if you used terraform apply before and the lab server was rebooted without destroying terraform you need to go to AWS console or delete any existing resources manually using aws commands.
I am still facing the same error even after deleting the terraform file and getting the latest version. How can I get a complete refresh of this particular lab?
Sorry for the inconvenience, I suggested get_latest_version if you make changes in the lab and want to start over. But if the terminal crash only in terraform apply in step 2.4 you might have issues with terraform existing resources. If the terminal continues to crash, run the following command instead:
terraform apply -no-color 2> errors.txt.
and post a screenshot of your output.
If the issue continues you can ask for a lab refresh with this form, that will take 2-3 business days. Thank you
now as shown in the above image this is happening. I have already requested for the lab refresh 2 days ago and I got the reply as its done. But after that the lab started crashing at terraform init itself, so I again tried to get the latest version of the file after deleting the previous one, and now this is happening.
It looks like terraform didn’t find anything in the main.tf and outputs.tf files. Could you follow the instructions to uncomment the corresponding blocks in those files and save. Thank you
When you update the lab with to Get latest version in case you want to start over it wiill not replace/overwrite the main.tf and output.tf files. Afterwards you will have two new files and continue from the beginning.
Uncomment lines 1-15 from main.tf and 2-8 from `outputs.tf’ as shown here. If you uncomment other blocks your terminal will crash:
After you get apply complete you can continue with running de-c1w4-etl-job job and follow the instructions to uncomment the rest of the lab. Hope it helps
Sorry, it was my mistake. I forgot to uncomment since I have been repeating all this steps multiple times, it went out of my mind that the new files would have the comments.
Thank you very much for your help and support support, I am done with this lab now
@jeang5812 glad it helped.
A few things to remember that might stop the terminal from crashing, use terraform apply -no-color 2> errors.txt which creates an error file that shows any existing resources.
You need to delete those resources manually or from the console to allow terraform apply to stop the terminal from crashing.
If the terminal crashes on terraform plan most probably you uncomment the wrong blocks in the main.tf and outputs.tf files. Hope it will help you in the future
Hi @jeang5812 ,
I too requested for lab refresh. How did you get a notification that your lab was refreshed? Was it through “Messages” section on left side pane?
Hi @tanmayb
I got an email that the lab has been now refreshed. it took around 1.5 days from the time I filled the form.
One thing to note if in case you face the same problem as me, even after lab refresh my terminal was crashing after “terraform init” command, so I again deleted my terraform folder and got the latest version as suggested by @Georgios above, and then it worked for me.