State file is stored in git lab terraform state, How to update the state file in terraform gitlab ci from my local

In my project of terraform have 3 environments , dev, stage and prod to provision aws infrastructure .instead of s3 all the state files are store in gitlab terraform state.

I have stored my terraform state file in gitlab terraform state with respective environment. ,

I am having an issue in dev environment that one of the resource mistakenly deleted . next update is not going through , How to update the gitlab resource skip and update the state from my local . following this documentation

If I have an access this state with gitlab ci token , state file is getting broken and all the terraform states are getting deleted in dev .

what is the best way to update the state file . I need help