Skip to content

Fix - add validator to id in gitlab_project data source

Currently, the documentation states either a project id or path with namespace can be passed to the id attribute. However, when passing a path with namespace as id and running a terraform plan, then apply, terraform fails because it seems to be returning the numerical project id after the lookup but in the plan it expected the id attribute to be a path instead. This change adds a validator to the id attribute to ensure id is always a numerical string, since there is another attribute, path_with_namespace that should be used when wanting to pass a path with a namespace to the gitlab_project data source.

Fixes #1431 (closed)

Edited by Mark Nessen

Merge request reports

Loading