Repository: crossplane-contrib/provider-gitlab
Pull request #211 (2025-07-03 15:08:46)

feat(project): Readd deprecated properties
<!--
Thank you for helping to improve Crossplane!

Please read through https://git.io/fj2m9 if this is your first time opening a
Crossplane pull request. Find us in https://slack.crossplane.io/messages/dev if
you need any help contributing.
-->

### Description of your changes

<!--
Briefly describe what this pull request does. Be sure to direct your reviewers'
attention to anything that needs special consideration.

We love pull requests that resolve an open Crossplane issue. If yours does, you
can uncomment the below line to indicate which issue your PR fixes, for example
"Fixes #500":

-->

This readds deprecated properties that were removed in https://github.com/crossplane-contrib/provider-gitlab/pull/203 but still exist in the Gitlab API.

Properties are available in the Gitlab REST API for now. In a follow-up change the controller should use the new properties that replace the old fields instead. However, since the fields have not yet been removed that migration is not imminent right now.

I have:

- [x] Read and followed Crossplane's [contribution process].
- [x] Run `make reviewable test` to ensure this PR is ready for review.

### How has this code been tested

Manually

[contribution process]: https://git.io/fj2m9



Patch:
diff --git a/apis/projects/v1alpha1/project_types.go b/apis/projects/v1alpha1/project_types.go
index 4ef1e67..42f45da 100644
--- a/apis/projects/v1alpha1/project_types.go
+++ b/apis/projects/v1alpha1/project_types.go
@@ -153,6 +153,20 @@ type ProjectParameters struct {
 	// +optional
 	AllowMergeOnSkippedPipeline *bool `json:"allowMergeOnSkippedPipeline,omitempty"`
 
+	// NOTE: ApprovalsBeforeMerge is deprecated and approval rules should be
+	// used instead which has its own API.
+	//
+	// TODO: Implement approval rules API, maybe as separate MR or as part of
+	// this kind.
+	//
+	// TODO: Mark ApprovalsBeforeMerge as deprecated but keep it and replace it
+	// internally with a call to the approval rules API.
+
+	// How many approvers should approve merge request by default.More actions
+	// To configure approval rules, see Merge request approvals API.
+	// +optional
+	ApprovalsBeforeMerge *int `json:"approvalsBeforeMerge,omitempty"`
+
 	// Auto-cancel pending pipelines. This isn’t a boolean, but enabled/disabled.
 	// +optional
 	AutoCancelPendingPipelines *string `json:"autoCancelPendingPipelines,omitempty"`
@@ -202,6 +216,13 @@ type ProjectParameters struct {
 	// +optional
 	ContainerExpirationPolicyAttributes *ContainerExpirationPolicyAttributes `json:"containerExpirationPolicyAttributes,omitempty"`
 
+	// Enable container registry for this project.
+	//
+	// Deprecated: Use ContainerRegistryAccessLevel.
+	//
+	// +optional
+	ContainerRegistryEnabled *bool `json:"containerRegistryEnabled,omitempty"`
+
 	// Set visibility of container registry.
 	// +optional
 	ContainerRegistryAccessLevel *AccessControlValue `json:"containerRegistryAccessLevel,omitempty"`
@@ -372,6 +393,14 @@ type ProjectParameters struct {
 	// +optional
 	SuggestionCommitMessage *string `json:"suggestionCommitMessage,omitempty"`
 
+	// The list of tags for a project; put array of tags,
+	// that should be finally assigned to a project.
+	//
+	// Deprecated: Use topics instead.
+	//
+	// +optional
+	TagList []string `json:"tagList,omitempty"`
+
 	// The list of topics for the project;
 	// +optional
 	Topics []string `json:"topics,omitempty"`
@@ -512,12 +541,16 @@ type ProjectObservation struct {
 	HTTPURLToRepo             string                     `json:"httpUrlToRepo,omitempty"`
 	ImportError               string                     `json:"importError,omitempty"`
 	ImportStatus              string                     `json:"importStatus,omitempty"`
+	IssuesEnabled             bool                       `json:"issuesEnabled,omitempty"`
+	JobsEnabled               bool                       `json:"jobsEnabled,omitempty"`
 	IssuesAccessLevel         AccessControlValue         `json:"issuesAccessLevel,omitempty"`
 	BuildsAccessLevel         AccessControlValue         `json:"buildsAccessLevel,omitempty"`
 	LastActivityAt            *metav1.Time               `json:"lastActivityAt,omitempty"`
 	License                   *ProjectLicense            `json:"license,omitempty"`
 	LicenseURL                string                     `json:"licenseUrl,omitempty"`
 	Links                     *Links                     `json:"links,omitempty"`
+	MarkedForDeletionAt       *metav1.Time               `json:"markedForDeletionAt,omitempty"`
+	MergeRequestsEnabled      bool                       `json:"mergeRequestsEnabled,omitempty"`
 	MarkedForDeletionOn       *metav1.Time               `json:"markedForDeletionOn,omitempty"`
 	MergeRequestsAccessLevel  AccessControlValue         `json:"mergeRequestsAccessLevel,omitempty"`
 	NameWithNamespace         string                     `json:"nameWithNamespace,omitempty"`
@@ -531,10 +564,12 @@ type ProjectObservation struct {
 	SSHURLToRepo              string                     `json:"sshUrlToRepo,omitempty"`
 	ServiceDeskAddress        string                     `json:"serviceDeskAddress,omitempty"`
 	SharedWithGroups          []SharedWithGroups         `json:"sharedWithGroups,omitempty"`
+	SnippetsEnabled           bool                       `json:"snippetsEnabled,omitempty"`
 	SnippetsAccessLevel       AccessControlValue         `json:"snippetsAccessLevel,omitempty"`
 	StarCount                 int                        `json:"starCount,omitempty"`
 	Statistics                *ProjectStatistics         `json:"statistics,omitempty"`
 	WebURL                    string                     `json:"webUrl,omitempty"`
+	WikiEnabled               bool                       `json:"wikiEnabled,omitempty"`
 	WikiAccessLevel           AccessControlValue         `json:"wikiAccessLevel,omitempty"`
 }
 
diff --git a/apis/projects/v1alpha1/zz_generated.deepcopy.go b/apis/projects/v1alpha1/zz_generated.deepcopy.go
index 1b9b4f9..5aa488c 100644
--- a/apis/projects/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/projects/v1alpha1/zz_generated.deepcopy.go
@@ -1376,6 +1376,10 @@ func (in *ProjectObservation) DeepCopyInto(out *ProjectObservation) {
 		*out = new(Links)
 		**out = **in
 	}
+	if in.MarkedForDeletionAt != nil {
+		in, out := &in.MarkedForDeletionAt, &out.MarkedForDeletionAt
+		*out = (*in).DeepCopy()
+	}
 	if in.MarkedForDeletionOn != nil {
 		in, out := &in.MarkedForDeletionOn, &out.MarkedForDeletionOn
 		*out = (*in).DeepCopy()
@@ -1425,6 +1429,11 @@ func (in *ProjectParameters) DeepCopyInto(out *ProjectParameters) {
 		*out = new(bool)
 		**out = **in
 	}
+	if in.ApprovalsBeforeMerge != nil {
+		in, out := &in.ApprovalsBeforeMerge, &out.ApprovalsBeforeMerge
+		*out = new(int)
+		**out = **in
+	}
 	if in.AutoCancelPendingPipelines != nil {
 		in, out := &in.AutoCancelPendingPipelines, &out.AutoCancelPendingPipelines
 		*out = new(string)
@@ -1485,6 +1494,11 @@ func (in *ProjectParameters) DeepCopyInto(out *ProjectParameters) {
 		*out = new(ContainerExpirationPolicyAttributes)
 		(*in).DeepCopyInto(*out)
 	}
+	if in.ContainerRegistryEnabled != nil {
+		in, out := &in.ContainerRegistryEnabled, &out.ContainerRegistryEnabled
+		*out = new(bool)
+		**out = **in
+	}
 	if in.ContainerRegistryAccessLevel != nil {
 		in, out := &in.ContainerRegistryAccessLevel, &out.ContainerRegistryAccessLevel
 		*out = new(AccessControlValue)
@@ -1685,6 +1699,11 @@ func (in *ProjectParameters) DeepCopyInto(out *ProjectParameters) {
 		*out = new(string)
 		**out = **in
 	}
+	if in.TagList != nil {
+		in, out := &in.TagList, &out.TagList
+		*out = make([]string, len(*in))
+		copy(*out, *in)
+	}
 	if in.Topics != nil {
 		in, out := &in.Topics, &out.Topics
 		*out = make([]string, len(*in))
diff --git a/package/crds/projects.gitlab.crossplane.io_projects.yaml b/package/crds/projects.gitlab.crossplane.io_projects.yaml
index 813ae79..4e0912d 100644
--- a/package/crds/projects.gitlab.crossplane.io_projects.yaml
+++ b/package/crds/projects.gitlab.crossplane.io_projects.yaml
@@ -78,6 +78,11 @@ spec:
                     description: Set whether or not merge requests can be merged with
                       skipped jobs.
                     type: boolean
+                  approvalsBeforeMerge:
+                    description: |-
+                      How many approvers should approve merge request by default.More actions
+                      To configure approval rules, see Merge request approvals API.
+                    type: integer
                   autoCancelPendingPipelines:
                     description: Auto-cancel pending pipelines. This isn’t a boolean,
                       but enabled/disabled.
@@ -139,6 +144,12 @@ spec:
                   containerRegistryAccessLevel:
                     description: Set visibility of container registry.
                     type: string
+                  containerRegistryEnabled:
+                    description: |-
+                      Enable container registry for this project.
+
+                      Deprecated: Use ContainerRegistryAccessLevel.
+                    type: boolean
                   defaultBranch:
                     description: The default branch name. Requires initializeWithReadme
                       to be true.
@@ -350,6 +361,15 @@ spec:
                   suggestionCommitMessage:
                     description: The commit message used to apply merge request suggestions.
                     type: string
+                  tagList:
+                    description: |-
+                      The list of tags for a project; put array of tags,
+                      that should be finally assigned to a project.
+
+                      Deprecated: Use topics instead.
+                    items:
+                      type: string
+                    type: array
                   templateName:
                     description: |-
                       When used without useCustomTemplate, name of a built-in project template.
@@ -660,6 +680,10 @@ spec:
 
                       GitLab API docs: https://docs.gitlab.com/ce/api/projects.html
                     type: string
+                  issuesEnabled:
+                    type: boolean
+                  jobsEnabled:
+                    type: boolean
                   lastActivityAt:
                     format: date-time
                     type: string
@@ -713,6 +737,9 @@ spec:
                     - repoBranches
                     - self
                     type: object
+                  markedForDeletionAt:
+                    format: date-time
+                    type: string
                   markedForDeletionOn:
                     format: date-time
                     type: string
@@ -723,6 +750,8 @@ spec:
 
                       GitLab API docs: https://docs.gitlab.com/ce/api/projects.html
                     type: string
+                  mergeRequestsEnabled:
+                    type: boolean
                   nameWithNamespace:
                     type: string
                   namespace:
@@ -923,6 +952,8 @@ spec:
 
                       GitLab API docs: https://docs.gitlab.com/ce/api/projects.html
                     type: string
+                  snippetsEnabled:
+                    type: boolean
                   sshUrlToRepo:
                     type: string
                   starCount:
@@ -961,6 +992,8 @@ spec:
 
                       GitLab API docs: https://docs.gitlab.com/ce/api/projects.html
                     type: string
+                  wikiEnabled:
+                    type: boolean
                 type: object
               conditions:
                 description: Conditions of the resource.
diff --git a/pkg/clients/projects/project.go b/pkg/clients/projects/project.go
index d18c963..25b680c 100644
--- a/pkg/clients/projects/project.go
+++ b/pkg/clients/projects/project.go
@@ -69,11 +69,16 @@ func GenerateObservation(prj *gitlab.Project) v1alpha1.ProjectObservation { //no
 		ReadmeURL:                prj.ReadmeURL,
 		NameWithNamespace:        prj.NameWithNamespace,
 		PathWithNamespace:        prj.PathWithNamespace,
+		IssuesEnabled:            prj.IssuesEnabled, //nolint:staticcheck
 		IssuesAccessLevel:        v1alpha1.AccessControlValue(prj.IssuesAccessLevel),
 		OpenIssuesCount:          prj.OpenIssuesCount,
+		MergeRequestsEnabled:     prj.MergeRequestsEnabled, //nolint:staticcheck
 		MergeRequestsAccessLevel: v1alpha1.AccessControlValue(prj.MergeRequestsAccessLevel),
+		JobsEnabled:              prj.JobsEnabled, //nolint:staticcheck
 		BuildsAccessLevel:        v1alpha1.AccessControlValue(prj.BuildsAccessLevel),
+		WikiEnabled:              prj.WikiEnabled, //nolint:staticcheck
 		WikiAccessLevel:          v1alpha1.AccessControlValue(prj.WikiAccessLevel),
+		SnippetsEnabled:          prj.SnippetsEnabled, //nolint:staticcheck
 		SnippetsAccessLevel:      v1alpha1.AccessControlValue(prj.SnippetsAccessLevel),
 		CreatorID:                prj.CreatorID,
 		ImportStatus:             prj.ImportStatus,
@@ -115,6 +120,9 @@ func GenerateObservation(prj *gitlab.Project) v1alpha1.ProjectObservation { //no
 	if prj.LastActivityAt != nil {
 		o.LastActivityAt = &metav1.Time{Time: *prj.LastActivityAt}
 	}
+	if prj.MarkedForDeletionAt != nil { //nolint:staticcheck
+		o.MarkedForDeletionAt = &metav1.Time{Time: time.Time(*prj.MarkedForDeletionAt)} //nolint:staticcheck
+	}
 	if prj.MarkedForDeletionOn != nil {
 		o.MarkedForDeletionOn = &metav1.Time{Time: time.Time(*prj.MarkedForDeletionOn)}
 	}
@@ -292,6 +300,7 @@ func GenerateCreateProjectOptions(name string, p *v1alpha1.ProjectParameters) *g
 		EmailsDisabled:                      p.EmailsDisabled,
 		ResolveOutdatedDiffDiscussions:      p.ResolveOutdatedDiffDiscussions,
 		ContainerExpirationPolicyAttributes: clients.ContainerExpirationPolicyAttributesV1alpha1ToGitlab(p.ContainerExpirationPolicyAttributes),
+		ContainerRegistryEnabled:            p.ContainerRegistryEnabled, //nolint:staticcheck
 		ContainerRegistryAccessLevel:        clients.AccessControlValueV1alpha1ToGitlab(p.ContainerRegistryAccessLevel),
 		SharedRunnersEnabled:                p.SharedRunnersEnabled,
 		Visibility:                          clients.VisibilityValueV1alpha1ToGitlab(p.Visibility),
@@ -304,6 +313,7 @@ func GenerateCreateProjectOptions(name string, p *v1alpha1.ProjectParameters) *g
 		RemoveSourceBranchAfterMerge:             p.RemoveSourceBranchAfterMerge,
 		LFSEnabled:                               p.LFSEnabled,
 		RequestAccessEnabled:                     p.RequestAccessEnabled,
+		TagList:                                  &p.TagList, //nolint:staticcheck
 		Topics:                                   &p.Topics,
 		PrintingMergeRequestLinkEnabled:          p.PrintingMergeRequestLinkEnabled,
 		BuildGitStrategy:                         p.BuildGitStrategy,
@@ -314,6 +324,7 @@ func GenerateCreateProjectOptions(name string, p *v1alpha1.ProjectParameters) *g
 		CIForwardDeploymentEnabled:               p.CIForwardDeploymentEnabled,
 		AutoDevopsEnabled:                        p.AutoDevopsEnabled,
 		AutoDevopsDeployStrategy:                 p.AutoDevopsDeployStrategy,
+		ApprovalsBeforeMerge:                     p.ApprovalsBeforeMerge,
 		ExternalAuthorizationClassificationLabel: p.ExternalAuthorizationClassificationLabel,
 		Mirror:                                   p.Mirror,
 		MirrorTriggerBuilds:                      p.MirrorTriggerBuilds,
@@ -355,6 +366,7 @@ func GenerateEditProjectOptions(name string, p *v1alpha1.ProjectParameters) *git
 		EmailsDisabled:                      p.EmailsDisabled,
 		ResolveOutdatedDiffDiscussions:      p.ResolveOutdatedDiffDiscussions,
 		ContainerExpirationPolicyAttributes: clients.ContainerExpirationPolicyAttributesV1alpha1ToGitlab(p.ContainerExpirationPolicyAttributes),
+		ContainerRegistryEnabled:            p.ContainerRegistryEnabled, //nolint:staticcheck
 		ContainerRegistryAccessLevel:        clients.AccessControlValueV1alpha1ToGitlab(p.ContainerRegistryAccessLevel),
 		SharedRunnersEnabled:                p.SharedRunnersEnabled,
 		Visibility:                          clients.VisibilityValueV1alpha1ToGitlab(p.Visibility),
@@ -367,6 +379,7 @@ func GenerateEditProjectOptions(name string, p *v1alpha1.ProjectParameters) *git
 		RemoveSourceBranchAfterMerge:             p.RemoveSourceBranchAfterMerge,
 		LFSEnabled:                               p.LFSEnabled,
 		RequestAccessEnabled:                     p.RequestAccessEnabled,
+		TagList:                                  &p.TagList, //nolint:staticcheck
 		Topics:                                   &p.Topics,
 		BuildGitStrategy:                         p.BuildGitStrategy,
 		BuildTimeout:                             p.BuildTimeout,
@@ -377,6 +390,7 @@ func GenerateEditProjectOptions(name string, p *v1alpha1.ProjectParameters) *git
 		CIDefaultGitDepth:                        p.CIDefaultGitDepth,
 		AutoDevopsEnabled:                        p.AutoDevopsEnabled,
 		AutoDevopsDeployStrategy:                 p.AutoDevopsDeployStrategy,
+		ApprovalsBeforeMerge:                     p.ApprovalsBeforeMerge,
 		ExternalAuthorizationClassificationLabel: p.ExternalAuthorizationClassificationLabel,
 		Mirror:                                   p.Mirror,
 		MirrorUserID:                             p.MirrorUserID,
diff --git a/pkg/controller/projects/projects/project.go b/pkg/controller/projects/projects/project.go
index a6b8776..b0208ea 100644
--- a/pkg/controller/projects/projects/project.go
+++ b/pkg/controller/projects/projects/project.go
@@ -218,6 +218,9 @@ func lateInitialize(in *v1alpha1.ProjectParameters, project *gitlab.Project) { /
 	if in.AllowMergeOnSkippedPipeline == nil {
 		in.AllowMergeOnSkippedPipeline = &project.AllowMergeOnSkippedPipeline
 	}
+	if in.ApprovalsBeforeMerge == nil {
+		in.ApprovalsBeforeMerge = &project.ApprovalsBeforeMerge //nolint:staticcheck
+	}
 	if in.AutocloseReferencedIssues == nil {
 		in.AutocloseReferencedIssues = &project.AutocloseReferencedIssues
 	}
@@ -232,6 +235,9 @@ func lateInitialize(in *v1alpha1.ProjectParameters, project *gitlab.Project) { /
 	if in.CIForwardDeploymentEnabled == nil {
 		in.CIForwardDeploymentEnabled = &project.CIForwardDeploymentEnabled
 	}
+	if in.ContainerRegistryEnabled == nil { //nolint:staticcheck
+		in.ContainerRegistryEnabled = &project.ContainerRegistryEnabled //nolint:staticcheck
+	}
 	if in.ContainerRegistryAccessLevel == nil {
 		in.ContainerRegistryAccessLevel = clients.LateInitializeAccessControlValue(in.ContainerRegistryAccessLevel, project.ContainerRegistryAccessLevel)
 	}
@@ -306,6 +312,9 @@ func lateInitialize(in *v1alpha1.ProjectParameters, project *gitlab.Project) { /
 	in.SnippetsAccessLevel = clients.LateInitializeAccessControlValue(in.SnippetsAccessLevel, project.SnippetsAccessLevel)
 	in.SuggestionCommitMessage = clients.LateInitializeStringPtr(in.SuggestionCommitMessage, project.SuggestionCommitMessage)
 
+	if len(in.TagList) == 0 && len(project.TagList) > 0 { //nolint:staticcheck
+		in.TagList = project.TagList //nolint:staticcheck
+	}
 	if len(in.Topics) == 0 && len(project.Topics) > 0 {
 		in.Topics = project.Topics
 	}
@@ -322,6 +331,9 @@ func isProjectUpToDate(p *v1alpha1.ProjectParameters, g *gitlab.Project) bool {
 	if !clients.IsBoolEqualToBoolPtr(p.AllowMergeOnSkippedPipeline, g.AllowMergeOnSkippedPipeline) {
 		return false
 	}
+	if !clients.IsIntEqualToIntPtr(p.ApprovalsBeforeMerge, g.ApprovalsBeforeMerge) { //nolint:staticcheck
+		return false
+	}
 	if !clients.IsBoolEqualToBoolPtr(p.AutocloseReferencedIssues, g.AutocloseReferencedIssues) {
 		return false
 	}
@@ -340,6 +352,9 @@ func isProjectUpToDate(p *v1alpha1.ProjectParameters, g *gitlab.Project) bool {
 	if !clients.IsBoolEqualToBoolPtr(p.CIForwardDeploymentEnabled, g.CIForwardDeploymentEnabled) {
 		return false
 	}
+	if !clients.IsBoolEqualToBoolPtr(p.ContainerRegistryEnabled, g.ContainerRegistryEnabled) { //nolint:staticcheck
+		return false
+	}
 	if p.ContainerRegistryAccessLevel != nil && !cmp.Equal(string(*p.ContainerRegistryAccessLevel), string(g.ContainerRegistryAccessLevel)) {
 		return false
 	}
@@ -430,6 +445,9 @@ func isProjectUpToDate(p *v1alpha1.ProjectParameters, g *gitlab.Project) bool {
 	if !cmp.Equal(p.SuggestionCommitMessage, clients.StringToPtr(g.SuggestionCommitMessage)) {
 		return false
 	}
+	if !cmp.Equal(p.TagList, g.TagList, cmpopts.EquateEmpty()) { //nolint:staticcheck
+		return false
+	}
 	if !cmp.Equal(p.Topics, g.Topics, cmpopts.EquateEmpty()) {
 		return false
 	}


Test patch:
diff --git a/pkg/clients/projects/project_test.go b/pkg/clients/projects/project_test.go
index 43d4ef0..1a109a8 100644
--- a/pkg/clients/projects/project_test.go
+++ b/pkg/clients/projects/project_test.go
@@ -23,6 +23,7 @@ import (
 	"github.com/google/go-cmp/cmp"
 	gitlab "gitlab.com/gitlab-org/api/client-go"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/utils/ptr"
 
 	"github.com/crossplane-contrib/provider-gitlab/apis/projects/v1alpha1"
 	"github.com/crossplane-contrib/provider-gitlab/pkg/clients"
@@ -522,6 +523,7 @@ func TestGenerateCreateProjectOptions(t *testing.T) {
 				RemoveSourceBranchAfterMerge:             &removeSourceBranchAfterMerge,
 				LFSEnabled:                               &lfsEnabled,
 				RequestAccessEnabled:                     &requestAccessEnabled,
+				TagList:                                  ptr.To[[]string](nil),
 				Topics:                                   &topics,
 				PrintingMergeRequestLinkEnabled:          &printingMergeRequestLinkEnabled,
 				BuildGitStrategy:                         &buildGitStategy,
@@ -566,6 +568,7 @@ func TestGenerateCreateProjectOptions(t *testing.T) {
 				IssuesAccessLevel:              clients.AccessControlValueStringToGitlab(issuesAccessLevel),
 				ResolveOutdatedDiffDiscussions: &resolveOutdatedDiffDiscussions,
 				MergeMethod:                    clients.MergeMethodStringToGitlab(mergeMethod),
+				TagList:                        ptr.To[[]string](nil),
 				Topics:                         &topics,
 				BuildTimeout:                   &buildTimeout,
 			},
@@ -581,8 +584,9 @@ func TestGenerateCreateProjectOptions(t *testing.T) {
 				},
 			},
 			want: &gitlab.CreateProjectOptions{
-				Name:   &overrideName,
-				Topics: &topics,
+				Name:    &overrideName,
+				TagList: ptr.To[[]string](nil),
+				Topics:  &topics,
 			},
 		},
 	}
@@ -690,6 +694,7 @@ func TestGenerateEditProjectOptions(t *testing.T) {
 				RemoveSourceBranchAfterMerge:             &removeSourceBranchAfterMerge,
 				LFSEnabled:                               &lfsEnabled,
 				RequestAccessEnabled:                     &requestAccessEnabled,
+				TagList:                                  ptr.To[[]string](nil),
 				Topics:                                   &topics,
 				BuildGitStrategy:                         &buildGitStategy,
 				BuildTimeout:                             &buildTimeout,
@@ -732,6 +737,7 @@ func TestGenerateEditProjectOptions(t *testing.T) {
 				IssuesAccessLevel:              clients.AccessControlValueStringToGitlab(issuesAccessLevel),
 				ResolveOutdatedDiffDiscussions: &resolveOutdatedDiffDiscussions,
 				MergeMethod:                    clients.MergeMethodStringToGitlab(mergeMethod),
+				TagList:                        ptr.To[[]string](nil),
 				Topics:                         &topics,
 				BuildTimeout:                   &buildTimeout,
 			},
@@ -747,8 +753,9 @@ func TestGenerateEditProjectOptions(t *testing.T) {
 				},
 			},
 			want: &gitlab.EditProjectOptions{
-				Name:   &name,
-				Topics: &topics,
+				Name:    &name,
+				TagList: ptr.To[[]string](nil),
+				Topics:  &topics,
 			},
 		},
 	}
diff --git a/pkg/controller/projects/projects/project_test.go b/pkg/controller/projects/projects/project_test.go
index b04e443..425c1fb 100644
--- a/pkg/controller/projects/projects/project_test.go
+++ b/pkg/controller/projects/projects/project_test.go
@@ -31,6 +31,7 @@ import (
 	"github.com/google/go-cmp/cmp"
 	"github.com/pkg/errors"
 	gitlab "gitlab.com/gitlab-org/api/client-go"
+	"k8s.io/utils/ptr"
 	"sigs.k8s.io/controller-runtime/pkg/client"
 
 	"github.com/crossplane-contrib/provider-gitlab/apis/projects/v1alpha1"
@@ -85,6 +86,7 @@ func withClientDefaultValues() projectModifier {
 			NamespaceID:                               &i,
 			EmailsDisabled:                            &f,
 			ResolveOutdatedDiffDiscussions:            &f,
+			ContainerRegistryEnabled:                  &f,
 			SharedRunnersEnabled:                      &f,
 			PublicBuilds:                              &f,
 			OnlyAllowMergeIfPipelineSucceeds:          &f,
@@ -96,6 +98,7 @@ func withClientDefaultValues() projectModifier {
 			BuildTimeout:                              &i,
 			CIDefaultGitDepth:                         &i,
 			AutoDevopsEnabled:                         &f,
+			ApprovalsBeforeMerge:                      &i,
 			Mirror:                                    &f,
 			MirrorUserID:                              &i,
 			MirrorTriggerBuilds:                       &f,
@@ -356,6 +359,7 @@ func TestObserve(t *testing.T) {
 		"SnippetsAccessLevel":                       gitlab.PublicAccessControl,
 		"PagesAccessLevel":                          gitlab.PublicAccessControl,
 		"ResolveOutdatedDiffDiscussions":            true,
+		"ContainerRegistryEnabled":                  true,
 		"ContainerRegistryAccessLevel":              gitlab.EnabledAccessControl,
 		"SharedRunnersEnabled":                      true,
 		"Visibility":                                gitlab.PrivateVisibility,
@@ -366,6 +370,7 @@ func TestObserve(t *testing.T) {
 		"RemoveSourceBranchAfterMerge":              true,
 		"LFSEnabled":                                true,
 		"RequestAccessEnabled":                      true,
+		"TagList":                                   []string{"tag-1", "tag-2"},
 		"Topics":                                    []string{"tag-1", "tag-2"},
 		"CIConfigPath":                              "CI configPath",
 		"CIDefaultGitDepth":                         1,
@@ -384,6 +389,7 @@ func TestObserve(t *testing.T) {
 	f := false
 	i := 0
 	al := v1alpha1.PublicAccessControl
+	tags := []string{"tag-1 new", "tag-2 new"}
 	topics := []string{"tag-1 new", "tag-2 new"}
 	mergeMethod := v1alpha1.FastForwardMerge
 	s := "default string"
@@ -397,12 +403,14 @@ func TestObserve(t *testing.T) {
 		IssuesAccessLevel:                &al,
 		RepositoryAccessLevel:            &al,
 		MergeRequestsAccessLevel:         &al,
+		ApprovalsBeforeMerge:             ptr.To(0),
 		ForkingAccessLevel:               &al,
 		BuildsAccessLevel:                &al,
 		WikiAccessLevel:                  &al,
 		SnippetsAccessLevel:              &al,
 		PagesAccessLevel:                 &al,
 		ResolveOutdatedDiffDiscussions:   &f,
+		ContainerRegistryEnabled:         &f,
 		ContainerRegistryAccessLevel:     &al,
 		SharedRunnersEnabled:             &f,
 		Visibility:                       &visibility,
@@ -413,6 +421,7 @@ func TestObserve(t *testing.T) {
 		RemoveSourceBranchAfterMerge:     &f,
 		LFSEnabled:                       &f,
 		RequestAccessEnabled:             &f,
+		TagList:                          tags,
 		Topics:                           topics,
 		CIConfigPath:                     &s,
 		CIDefaultGitDepth:                &i,
@@ -469,9 +478,11 @@ func TestObserve(t *testing.T) {
 			RemoveSourceBranchAfterMerge:     f,
 			LFSEnabled:                       f,
 			RequestAccessEnabled:             f,
+			TagList:                          tags,
 			Topics:                           topics,
 			CIConfigPath:                     s,
 			CIDefaultGitDepth:                i,
+			ApprovalsBeforeMerge:             i,
 			Mirror:                           f,
 			MirrorUserID:                     i,
 			MirrorTriggerBuilds:              f,