This default behavior can also be disabled by setting `$TF_GITLAB_BACKEND_DISABLED` to `true`.
In that case, you'll have to declare and configure your backend and tfstate by yourself (see [Implicit Backend configuration support](#implicit-backend-configuration-support) below).
#### _Error acquiring the state lock_ workaround
The template takes care of [configuring the http backend](https://developer.hashicorp.com/terraform/language/settings/backends/http#configuration-variables),
including with authentication credentials (using GitLab job token).
Anyway - depending on the Terraform version you are using - you _may_ face this error when applying a plan that was computed in an upstream job:
> Error locking state: Error acquiring the state lock: HTTP remote state endpoint requires auth
This is [a known issue](https://gitlab.com/gitlab-org/terraform-images/-/issues/9). A simple workaround is to create a [Project Access Token](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html) with API rights, then declare it as a masked secret variable with name `TF_PASSWORD` in your Terraform project.
#### How to use GitLab backend in your development environment ?
First create a [Project Access Token](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html) or [Personal Access Token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#personal-access-tokens).