[terraform-gitlab-cicd] Backend -http Error loading state: workspaces not supported

i try to init my terraform using gitlab runner with “http” backend, but it reutne my error like this

$ ./terraform init -input=false -plugin-dir="/usr/share/terraform/providers" -migrate-state -backend-config=address=${TF_ADDRESS} -backend-config=lock_address=${TF_ADDRESS}/lock -backend-config=unlock_address=${TF_ADDRESS}/lock -backend-config=username=xxxxxxxx -backend-config=password=xxxxxxxxx -backend-config=lock_method=POST -backend-config=unlock_method=DELETE -backend-config=retry_wait_min=5

Successfully configured the backend “http”! Terraform will automatically
use this backend unless the backend configuration changes.
Error loading state: workspaces not supported

Hello.

Same issue here. it seems that gitlab (free on-prem) is not supporting the terraform workspace state files.
Is someone could confirm or show us a working exemple with workspace - gitlab please ?

Thanks.

Hi,

This issue seems to show that it is possible: Docs feedback - feature proposal: Terraform backend supporting multiple workspaces (#233445) · Issues · GitLab.org / GitLab · GitLab and also explains further down in that issue as well

This example from that link should help: Nicholas Klick / Terraform Example · GitLab