terrakube: Null value in column "workspace_id" of relation "job" violates not-null constraint
Bug description π
If you define a tree structure as follow:
βββ modules
βΒ Β βββ bucket
βΒ Β βββ main.tf
βββ staging
βΒ Β βββ backend.tf
βΒ Β βββ main.tf
βΒ Β βββ providers.tf
And you refer to the module in modules from the main.tf in staging/main.tf terrakube plan will crash as follow:
Running plan in the remote backend. Output will stream here. Pressing Ctrl-C
will stop streaming the logs, but will not stop the plan running remotely.
Preparing the remote plan...
The remote workspace is configured to work with configuration at
/projects/04_my_project/staging/ relative to the target repository.
OpenTofu will upload the contents of the following directory,
excluding files or directories as defined by a .terraformignore file
at /Users/myuser/Repositories/my-repo/.terraformignore (if it is present),
in order to capture the filesystem context the remote workspace expects:
/Users/myuser/Repositories/myrepo
There was an error connecting to the remote backend. Please do not exit
OpenTofu to prevent data loss! Trying to restore the connection...
Still trying to restore the connection... (3s elapsed)
Steps to reproduce
- Create the above file structure
- Create a VCS workspace which working directory points to the staging folder
- In production folder make sure to refer the module stored in
../modules/my-module - Run terraform plan
Expected behavior
It should at least display an error rather than making the API pod crash.
Example repository
No response
Anything else?
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 24 (24 by maintainers)
Thatβs really strange and annoying! hopefully we wont run into it again !
Thank you anyway !