Recreate gitlab_project_variable if it was manually deleted

Created by: MajorBreakfast

Hello,

I just ran into the issue that planning fails with the following error if a previously created project variable has been manually deleted. It would be better if the provider recreated the variable instead of failing.

Error: GET https://gitlab.example.com/api/v4/projects/81/variables/MY_VARIABLE: 404 {message: 404 Variable Not Found}
  • Terraform version: 0.12.23
  • GitLab provider version: 2.5.0
  • Affected Resource(s)
    • gitlab_project_variable
    • gitlab_group_variable (likely) (Edit: Confirmed. See first comment)