Monday 8am and staging has a state lock from Friday night

iacstateterraform98 replies · 1.2K views · started
  1. guys pls help trying to apply a tiny chagne to staging and Terraform refuses:

    the lock info says it was created by a CI job that, as far as i can see, was cancelled hours ago. our backend is S3 with DynamoDB locking. i've read that force-unlock can corrupt state, so Im frozen. Whats the safe procedure??

    everyone on the team is now waiting for this change, and Im the one holding teh keyboard... id really appreciate a calm, step-by-step answer on how to check that its safe and how to recover if soemthing is half-applied. seriously need help here 😭

    5
  2. hmmm before unlocking, make sure teh holder is really gone. The error shows Who, Operation and Created lol Check that CI job and that colleagues machine. If no process is running, its safe to run:

    terraform force-unlock <LOCK_ID>
    

    force-unlock only removes teh lock entry, it does not change state contents. fingers crossed 🤞

    1 0 helpful
  3. yesss ok update: did what @hugo.moreau said and its fine now u guys are the best!!!

    0 1 helpful
  4. i swear iac is cursed pls help 🙏

    12 3 helpful
  5. lol same thing happened to me try turning off the cache first, fixed it for me. my desktop is officially haunted good luck man!

    2 0 helpful
  6. have u checked your locking settings?? mine were reset after an update, reading this at 2am instead of sleeping, no regrets

    4 0 helpful
  7. pro tip: write down what u change. i didnt and had to redo staging from scratch fingers crossed 🤞

    9 0 helpful
  8. btw mods can we pin this thread

    0 2 helpful
  9. for me it was the default config. swapped it and boom, fixed fingers crossed 🤞

    2 0 helpful
  10. mods can we pin this thread :)

    0 1 helpful
  11. @noahi565 thank u this worked!! u guys are the best!!!

    3 0 helpful
  12. i come back to this thread every week just for the drama. try turning off the driver first, fixed it for me :)

    2 0 helpful
  13. ok weird one told my boss it would take 10 minutes... its been all weekend. honestly just reset teh default config and save yourself the pain im about to throw this thing out the window lol

    2 2 helpful
  14. oh also page 5 lets gooo

    2 0 helpful
  15. hmmm any update on this?. spent 20 minutes on locking and im still not done ?

    3 6 helpful
  16. :)

    0 0 helpful
  17. wait what respectfully disagree, i tried that and it made state worse

    0 6 helpful

Reply to this topic

Sign in or create an account to reply.