Skip to content

'gitlab_repository_file' returns an error when 'file_path' contains './'

Follow up on #1082 (closed)

First run shows:

unexpected new value: Root resource was present, but now absent

The terraform resource doesn't show as completed. The file actually gets created. BUT doesn't get added to state.

A second run yields:

: 400 {message: A file with this name already exists}

│   with gitlab_repository_file.app_kustomization,
│   on flux.tf line 84, in resource "gitlab_repository_file" "app_kustomization":
│   84: resource "gitlab_repository_file" "app_kustomization" {

Removing the ./ from the file_path does work.

The upstream bug still exists.

@PatrickRice will open PR to update docs so this is known issue upstream and the provider can't fix it.

Edited by Chris Denneen