Terraform state backend problem

When using gitlab as a terraform state backend, if the terraform has never been run before the /lock api called returns a 404. Which makes terraform plan fail. So the first call has to be done without lock/unlock params once setup the api works without issue since the state file then exists.

Atleast from command line I kept get 404 until I commented all the lock/unlock options.