C1W4 Lab Operation Errors of terraform apply

Hello,

After ‘terraform apply’, my terminal crashes, and i receive following error note on errors.txt file:

Error: creating Glue Connection (de-c1w4-rds-connection): operation error Glue: CreateConnection, https response error StatusCode: 400, RequestID: b56b32ac-4f8f-4dd6-8213-ee886ef4a75b, AlreadyExistsException: Connection already exists.

with module.etl.aws_glue_connection.rds_connection,
on modules/etl/glue.tf line 6, in resource “aws_glue_connection” “rds_connection”:
6: resource “aws_glue_connection” “rds_connection” {

Error: creating IAM Role (de-c1w4-glue-role): operation error IAM: CreateRole, https response error StatusCode: 409, RequestID: 2d7e3e5d-24eb-4f53-9ab0-58280a92faa0, EntityAlreadyExists: Role with name de-c1w4-glue-role already exists.

with module.etl.aws_iam_role.glue_role,
on modules/etl/iam_roles.tf line 1, in resource “aws_iam_role” “glue_role”:
1: resource “aws_iam_role” “glue_role” {

I requested two lab refreshes, and even though i successfully created and run the job, my terminal crashed again for the vector database creation step. Should i request another lab refresh or is there a way for me to handle this issue manually?

Thanks

Hello @ddenizergun
Sorry for the inconvenience. Please, request a lab refresh. Try your best to get the exercises right on your first try after the lab refresh to avoid these errors.

Hi, I am struggling with the same issue. I refreshed the lab but get the same error. I tried manually importing the terraform resources as well as adding

lifecycle {
prevent_destroy = true
}

in different places, but that didn’t solve my error. The really painful aspect of it is that with each attempt the terminal crashes and I need to run all the scripts prior to this. Any help would be much appreciated.

Hello @olove
Please, refrain from adding any code snippets or changing anything outside the scope of the lab instructions. You can fill out the lab refresh form to get a fresh start, and you can always use the terraform apply -no-color 2> errors.txt command to see what’s going wrong with the terraform commands.