Terraform execution error compiling C2W3Lab1 Code

Hello instructors/ mentors,

This time the challenge is with C2W3 Lab1. The “terraform plan” command throws the error(log attached) in ec2 and network.tf files. Please note that, Exercise code changes are same when compared to solution folder changes in the lab.
Could you please what is the issue here ?

Thanks
Kartheek

Hello @Karthikeyadarbha,
This error happens if in step 2.3 you didn’t setup the subnets in terraform.tfvars file correctly, you could find them in cloudformation outputs, thanks:


1 Like

Thank you, it helped!

1 Like

When performing C2W3 Lab3,
there is one more following error in the space “Testing Data Quality with Great expectations”.

Could you please help resolving the same ?

Thanks
Kartheek

Hello @Karthikeyadarbha:
I could reproduce the issue after trying to rerun those cells a second time.
The error message you’re encountering suggests that an environment variable ${MYSQL_CONNECTION_STRING} is not properly set before being used in your SQLAlchemy.
This is why it is provided to you and if it happens, best thing you could delete that environment and create a new one. Hope it helps

Thanks for that quicker response. I have made multiple attempts already by deleting and recreating the environment in Cloud9. That still gives the same error from the past 2-3 days.
Regards
Kartheek

Hello,
I am not sure if there is another workaround and you probably get errors in the following cells. Like when you create the data source it already exists.
I think you should try and complete this form to refresh your lab. You could try and configure the credentials but I am not sure how it will work in this environment since they are already provided. Hope it helps