There was an error after running terraform plan. I tried to redo the assignment many times, and this part always giving me error.
│ Error: Error acquiring the state lock
│
│ Error message: resource temporarily unavailable
│ Lock Info:
│ ID:
│ Path: /home/coder/.local/share/code-server/User/de-c1w4-XXXXXXXXXXX-us-east-1-terraform-state.state
│ Operation: OperationTypePlan
│ Who:
│ Version: 1.9.8
│ Created: 2025-06-11 16:40:15.019620742 +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.
With my first few attempts, it was past 2 hrs before I redid. However, for the last 2 attempts wherein I encountered that error, I didn’t wait for 2 hrs.
Is it possible that if I redo the lab, all the Terraform files are new? I might have accidentally deleted something from the main, outputs, or other files. I noticed that after leaving the lab, the Terraform folder still retains the previous files. But every time I relaunch the lab, shouldn’t the files always be freshly generated?
Hi @hawraa.salami. I didn’t do that. Let me try it. I don’t get that “Enter a value” if I reboot and try it again. Thanks for your response. I appreciate it.