gitlab_group+gitlab_application_settings resources do not support setting the code_owner_approval_required flag.

The GitLab groups allow setting a 'Require approval from code owners` field in the UI which has not been exposed by the Terraform provider.

Implementation Guide

  • Follow the CONTRIBUTING.md guide for setting up your local development environment.
  • Clone the community fork of this project.
  • In internal/provider/sdk/resource_gitlab_group.go, add a new attribute called code_owner_approval_required. Follow the developer_can_initial_push attribute to see where the new attribute needs to be referenced.
  • Update the acceptance tests in internal/provider/sdk/resource_gitlab_group_test.go to verify the field can be set when the resource is created and updated.
  • In internal/provider/sdk/schema_gitlab_application_settings.go, add a new attribute called code_owner_approval_required. Follow the developer_can_initial_push attribute to see where the new attribute needs to be referenced, as it should also need adding to internal/provider/sdk/resource_gitlab_application_settings.go.
  • Update the acceptance tests in internal/provider/sdk/resource_gitlab_application_settings_test.go to verify the field can be set when the resource is created and updated.
Edited by 🤖 GitLab Bot 🤖