State locking and how to handle it
See original GitHub issueCommunity Note
- Please vote on this issue by adding a š reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave ā+1ā or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
cdktf & Language Versions
cdktf --version
0.0.13-pre.2f0b966cb25b6dc5066ee1551fdb32ff47a9c0fd
Affected Resource(s)
State and state locks
Expected Behavior
A way to escape a leaky abstraction of Terraform, directly with cdk-tf tooling. I donāt see any way to manage a local state directly with the cdktf cli.
Actual Behavior
I happened to have a state lock because I hard cancelled a deploy. Next deploy failed because of the lock. Manually deleting lock files didnāt really work. The CLI didnāt suggest any way to resolve the issue (I think Terraform actually helps you resolve locked states because of mistakes). Iām wondering if your aiming (for the future I know that this is alpha software) only for experienced Terraform devs or if this will be a tool that can fully abstract that itās all Terraform under doing the hard work (like Pulumi does). Iām really missing state commands like the ones in Terraform.
Steps to Reproduce
Hard cancel a deploy (with a local state) and try to deal with the lock.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:8 (4 by maintainers)
Hey. Iām using
cdktf plan
in CI and each time it locking state for all CI jobs. Can I disable locking? Seems that-lock=false
will not work withcdktf
?For anyone encountering this issue. I went to the DynamoDB table where the locks are stored and remove the lock manually. That helped me re-run
cdktf deploy <stack>
successfully.