C3_W2 Programming Assignment: Assignment 2: Building a Data Lakehouse with AWS Lake Formation and Apache Iceberg

C3_W2

Hello. How can I pass the Assignement 2 if terminal is constantly crashing during: terrraform init
plan
apply
?

That does not makes any sense

Or the Lab can disconnect. It forces to star from over:

Right now I moved a setup.sh script to /terraform and spamming:

source setup.sh && terraform init && terraform plan && terraform apply -auto-approve

Now encountering:

│ Error: Error acquiring the state lock
│ 
│ Error message: resource temporarily unavailable
│ Lock Info:
│   ID:        4eb22311-f03c-6f10-28ff-62bd577a60b1
│   Path:      /home/coder/.local/share/code-server/User/de-c3w2a1-037182228425-us-east-1-terraform-state.state
│   Operation: OperationTypePlan
│   Who:       coder@f83d09a1a972
│   Version:   1.10.3
│   Created:   2025-01-25 10:58:30.184930042 +0000 UTC
│   Info:      
│ 
│ 
│ Terraform acquires a state lock to protect the state from being written
│ by multiple users at the same time. Please resolve the issue above and try
│ again. For most commands, you can disable locking with the "-lock=false"
│ flag, but this is not recommended.

When I do below terminal is again crashing:
terraform force-unlock 4eb22311-f03c-6f10-28ff-62bd577a60b1

Maybe working on a cluster where multiple users/students can process data wasn’t really a good idea?

Hello @konutech,
I tried to reproduce the issue and skipped 3.2.2 and continued to 4.3 to create all the jobs at once and still passed the grader. Then I created a mismatch between the output.tf. and main.tf files (uncommented transform module only on output.tf) which caused the terminal to crash when terraform plan.
I suggest starting from the beginning:

  1. delete the terraform folder
  2. go to help get latest version to get your folder back
  3. If you have issues with the deployment of the landing module you can continue to 4.3 and uncomment both main.tf and output.tf
  4. terraform init
    plan
    apply
  5. run all the jobs will pass the grade

Trying from the start - including deletion of terraform folder - was indeed helpful

Thank you kindly Georgios

Cheers

1 Like