Gitlab pipeline Authentication error while creating cloudflare resource with terraform but works locally

Hi,

I am using self managed gitlab.
GitLab Enterprise Edition 12.3.1-ee
Terraform = v.12
docker image : registry.gitlab.com/gitlab-org/terraform-images/stable:latest

I have created gitlab-ci pipeline to deploy terraform resources for cloudflare. Project is to create firewall rule via terraforn: https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/firewall_rule

Same credentials work when I create resource via cli or postman but shows below error when I create via gitlab piepline.

Output
Error: error creating Filter for zone “XXXXXXXXXXX”: error from makeRequest: HTTP status 400: content “{“success”:false,“errors”:[{“code”:10000,“message”:“Authentication error”}]}\n”

Pipeline steps are similar to https://gitlab.com/nicholasklick/gitlab-terraform-aws/-/blob/master/.gitlab-ci.yml

Anyone has faced similar situation ? Any resolution ?

Resolved by adding account id. Thanks.