Missing option to disable "Model Experiments" and "Model Registry" in resource gitlab_project
Missing option to disable "Model Experiments" and "Model Registry" in resource gitlab_project schema.
Update Schema
I have been trying to disable two options in gitlab v16.7 using Terraform; in project settings we can find "Model Experiments" and "Model Registry" features that are enabled by default. I cannot find a way to disable it and there is no XXX_access_level attribute in the schema to change this setting.
Following is the merge request for the implementation of this settings in the Gitlab API : gitlab!132972 (merged)
Change in schema could be like :
- model_experiments_access_level (String) Set the model experiments access level. Valid values are disabled, private, enabled.
- model_registry_access_level (String) Set the model registry access level. Valid values are disabled, private, enabled.
I stay at your disposal for any details Sincerely Paul
Implementation Details
To implement these, ensure they're present in the go-gitlab library for Project APIs, then update /internal/sdk/resource_gitlab_project.go, and:
- Include the attributes within the project schema
- Add to the Create, Update, and Read functions
- For the "Create" API, update the
postCreateUpdatefunction to ensure they're set on forks and imports in addition to newly created projects
Edited by Patrick Rice