Apply teraform in gitlab-ci

Hi, I am trying to do a terraform apply inside of a gitlab pipelines but I get an error related to the auth token.

Error: Required token could not be found

When doing terrafom init I would have expected it to init terraform, instead I get the token error.
I am using regular gitlab pipeline.
Inside of repo I have a terraform folder that contains configuration for a fargate task definition, I want to use sed to update the container image name then apply terraform in this new config.

ci-config looks like:

Apply dev:
  stage: apply
    - dev
    - cd ${TF_ROOT}
    - gitlab-terraform init
    - gitlab-terraform validate
    - gitlab-terraform plan
    - gitlab-terraform plan-json

I had a look at lib/gitlab/ci/templates/Terraform/Base.latest.gitlab-ci.yml · master · / GitLab · GitLab

terraform backend is like:

terraform {
  backend "remote" {
    organization = "spockee"

    workspaces {
      name = "Prestashop"

Any help would be appraciated, or maybe there is something I am not doing right?
Thanks in advance, have a good day!

Maybe I am doing a mistake here, is gitlab-terraform command related to remote state hosted on gitlab ?
(What I am trying to do is to update state on terraform cloud)

So at the end
I updated gitlab ci like this:

Apply dev:
    name: "hashicorp/terraform"
    entrypoint: [""]
  stage: deploy
    - dev
    - sed -i "s@_TERRAFORM_TOKEN_@${TERRAFORM_TOKEN}@g" ./.terraformrc.json
    - mkdir ~/.terraform.d
    - cp ./.terraformrc.json ~/.terraform.d/credentials.tfrc.json
    - cd ${TF_ROOT}
    - sed -i "s@_DOCKER_IMAGE_@$IMAGE_NAME@g" ./
    - terraform init
    - terraform validate
    - terraform plan
    - terraform apply

and was able to connect with remote backend on terraform cloud to apply change of docker image built in pipeline.