For every single lab, terraform is causing issues where I get a 400 error after doing a terraform plan, also requiring me to enter yes for 10 different prompts, when the first run of lab required me to do it once. Rebooting lab. The errors included after terraform plan includes:
did not work.no matching EC2 Subnet found.
reading IAM Role (yes): couldn’t find resource.
reading EC2 Security Group: operation error EC2: DescribeSecurityGroups, https response error StatusCode: 400, RequestID: 0882835c-62dc-4b50-81f4-0324cf9c9e1b, api error InvalidGroupId.Malformed: Invalid id: “yes” (expecting “sg-…”)
This not only happened in 1 lab but multiple. There error wasn’t previously an issue, but it started when I left a lab afk for hours and had to restart it. And this error carried forward from my practice lab to graded assignment.
I could reproduce the issue after I was prompted to input those variables instead of running source scripts/setup.sh command (step 1.2.4) to successfully setup all the environment variables and Terraform backend configurations. You need to run this command (step 1.2.4) every time the terminal restarts so you don’t get this error. Hope it helps
I hope you’re doing well. I’m encountering the same issue with my CLI as Pisith_Soeun. Every time I run terraform plan, I get the error shown in the attached screenshot. I’ve also tried running the source scripts/setup.sh command multiple times, but the problem persists.
I requested Coursera to restart the lab assignment, but the issue remains unresolved.
Your assistance with this would be greatly appreciated.
You could run this command terraform apply -no-color 2> errors.txt instead of terraform apply . You should be able to see a errors.txt file and some existing resources that cause the terminal to crash (e.g. de-c3w2a1-rds-connection).
Run source scripts/setup.sh and go to terraform folder but before you run the commands like normally check the errors.txt file for those resources and try to find them and delete them. Here you only have one de-c3w2a1-rds-connection.
how long does it take for the lab refresh to happen after filling out the form? I wish we could go back to volcrum. These labs will fail permanently when you leave AFK to return again, and actually affect all your future labs because of terraform and the subnets/vpc errors and the 400 error code…
Sorry for the inconvenience the lab refresh normally takes 1-2 business days but since it’s weekend it takes a bit longer. Your issue happens and needs to input those variables instead of running source scripts/setup.shcommand (step 1.2.4) to set them automatically. Sorry if it is not clear in the instructions but you need to run the command in step 1.2.4 every time your terminal crash so you won’t asked for 10 prompts. Thank you