Repository: jfrog/terraform-provider-artifactory

Issue:
artifactory_remote_vcs_repository always wants to apply non-existing changes
**Describe the bug**

My artifactory_remote_vcs_repository always tries to apply a change but changes nothing:

`
Terraform will perform the following actions:

  # artifactory_remote_vcs_repository.vcs["ansiblegalaxy"] will be updated in-place
  ~ resource "artifactory_remote_vcs_repository" "vcs" {
        # (44 unchanged attributes hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

Do you want to perform these actions in workspace "sams"?
  Terraform will perform the actions described above.
  Only 'yes' will be accepted to approve.

  Enter a value: yes

artifactory_remote_vcs_repository.vcs["ansiblegalaxy"]: Modifying...
artifactory_remote_vcs_repository.vcs["ansiblegalaxy"]: Modifications complete after 0s
`
My first analysis showed one IMHO wrong topic. The API call to fetch the repository from Artifactory results in

`
{'allowAnyHostAuth': False,
 'archiveBrowsingEnabled': True,
 'assumedOfflinePeriodSecs': 300,
 'blackedOut': False,
 'blockMismatchingMimeTypes': True,
 'bypassHeadRequests': False,
 'clientTlsCertificate': '',
 'contentSynchronisation': {'enabled': False,
                            'properties': {'enabled': False},
                            'source': {'originAbsenceDetection': False},
                            'statistics': {'enabled': False}},
 'curated': False,
 'description': ' (local file cache)',
 'disableProxy': False,
 'disableUrlNormalization': False,
 'downloadRedirect': False,
 'enableCookieManagement': False,
 'environments': [],
 'excludesPattern': '',
 'hardFail': False,
 'includesPattern': 'freeipa/ansible-freeipa/**,ansible-collections/ansible.posix/**,containers/ansible-podman-collections/**,redhat-cop/**',
 'key': 'ansiblegalaxy',
 'listRemoteFolderItems': False,
 'localAddress': '',
 'maxUniqueSnapshots': 0,
 'metadataRetrievalTimeoutSecs': 60,
 'mismatchingMimeTypesOverrideList': '',
 'missedRetrievalCachePeriodSecs': 1800,
 'notes': '',
 'offline': False,
 'packageType': 'vcs',
 'passThrough': False,
 'password': '',
 'priorityResolution': False,
 'propagateQueryParams': False,
 'propertySets': ['artifactory'],
 'proxy': '',
 'rclass': 'remote',
 'repoLayoutRef': 'vcs-default',
 'retrievalCachePeriodSecs': 7200,
 'retrieveSha256FromServer': False,
 'sendContext': False,
 'shareConfiguration': False,
 'signedUrlTtl': 90,
 'socketTimeoutMillis': 15000,
 'storeArtifactsLocally': True,
 'synchronizeProperties': False,
 'unusedArtifactsCleanupPeriodHours': 0,
 'url': 'https://github.com/',
 'username': '',
 'vcsGitDownloadUrl': '',
 'vcsGitProvider': 'GITHUB',
 'vcsType': 'GIT',
 'xrayDataTtl': 90,
 'xrayIndex': False}
`

Only difference to a second repo configured via terraform is the field **vcsGitDownloadUrl** which is missing in the working repo!

Artifactory version: 7.104.13 (EnterpriseX, Self-Hosted)
Terraform version: v1.10.2
Provider version: 12.9.1

**Expected behavior**

After applying the change it should not offer to change it again. Additionally it should tell me the change it itends to apply (only hidden changes displayed)


Discussion:
@blabu23: Any way I can support in this issue?@jcoste: I have the same problem with other resources : 
```
  # artifactory_remote_bower_repository.bower-proxy-official will be updated in-place
  ~ resource "artifactory_remote_bower_repository" "bower-proxy-official" {
        # (34 unchanged attributes hidden)
    }

  # artifactory_remote_cocoapods_repository.cocoapods-proxy-official will be updated in-place
  ~ resource "artifactory_remote_cocoapods_repository" "cocoapods-proxy-official" {
        # (34 unchanged attributes hidden)
    }

  # artifactory_remote_composer_repository.php-proxy-official will be updated in-place
  ~ resource "artifactory_remote_composer_repository" "php-proxy-official" {
        # (34 unchanged attributes hidden)
    }

  # artifactory_remote_vcs_repository.vcs-proxy-github will be updated in-place
  ~ resource "artifactory_remote_vcs_repository" "vcs-proxy-github" {
        # (34 unchanged attributes hidden)
    }
```

Provider version 12.9.2
Artifactory 7.98.13@madelaney: I'm hitting a similar issue:

```console
OpenTofu used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

OpenTofu will perform the following actions:

  # artifactory_remote_cocoapods_repository.cocoapods-remote will be updated in-place
  ~ resource "artifactory_remote_cocoapods_repository" "cocoapods-remote" {
        # (31 unchanged attributes hidden)
    }
```

Using OpenTofu
```console
OpenTofu v1.9.0
on darwin_arm64
+ provider registry.opentofu.org/hashicorp/null v3.2.3
+ provider registry.opentofu.org/hashicorp/random v3.7.2
+ provider registry.opentofu.org/jfrog/artifactory v12.9.2
+ provider registry.opentofu.org/jfrog/platform v2.2.3
```@srinivasgowda097: @madelaney @blabu23 @jcoste Thanks for the report! I've added this to our plan to investigate and fix it soon in next release@srinivasgowda097: Duplicate of https://github.com/jfrog/terraform-provider-artifactory/issues/1250 @srinivasgowda097: @madelaney @blabu23 @jcoste Fix available in `12.9.6` version@jcoste: Hello, I juste try with the 12.9.6 version of the provider and it still want to apply changes even after a `terraform apply` :

```
# artifactory_remote_vcs_repository.vcs-proxy-github will be updated in-place
  ~ resource "artifactory_remote_vcs_repository" "vcs-proxy-github" {
        # (44 unchanged attributes hidden)
    }
```

Unlike #1250  `content_synchronisation` is not displayed here.@blabu23: This problem has not been solved yet! Even in 12.10.0 the problem still exists!@blabu23: I created a new ticket, since this problem is not solved yet: #1334

Solution patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0b76494e..a9ce0543 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,17 @@
-## 12.9.6 (June 13, 2025). Tested on Artifactory 7.111.8 with Terraform 1.12.0 and OpenTofu 1.9.1
+## 12.9.6 (June 17, 2025).
+
+NOTES:
+
+If you are upgrading from a version earlier than 12.8.3, please upgrade to 12.8.3 first. Then proceed to the latest version to avoid state drift in the content_synchronisation attribute of remote repositories.
 
 IMPROVEMENTS:
 
 * GNUmakefile : Enhanced ARM64 Build Process with Dynamic GOARM64 Detection. PR: [1282](https://github.com/jfrog/terraform-provider-artifactory/pull/1282)
 
+BUG FIXES:
+
+* resource/artifactory_\*\_repository: Fix state drift handling for content_synchronisation attribute in remote repo's. Issue: [#1250](https://github.com/jfrog/terraform-provider-artifactory/issues/1250). PR: [#1274](https://github.com/jfrog/terraform-provider-artifactory/pull/1274)
+
 ## 12.9.5 (June 3, 2025). Tested on Artifactory 7.111.8 with Terraform 1.12.0 and OpenTofu 1.9.1
 
 BUG FIXES:
diff --git a/go.mod b/go.mod
index b7d00a4e..e4c25027 100644
--- a/go.mod
+++ b/go.mod
@@ -19,7 +19,7 @@ require (
 	github.com/hashicorp/terraform-plugin-mux v0.19.0
 	github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
 	github.com/hashicorp/terraform-plugin-testing v1.13.0
-	github.com/jfrog/terraform-provider-shared v1.30.0
+	github.com/jfrog/terraform-provider-shared v1.30.1
 	github.com/samber/lo v1.50.0
 	github.com/sethvargo/go-password v0.3.1
 	github.com/stretchr/testify v1.10.0
diff --git a/go.sum b/go.sum
index 33a9b8e4..75af7e6d 100644
--- a/go.sum
+++ b/go.sum
@@ -136,8 +136,8 @@ github.com/imdario/mergo v0.3.15 h1:M8XP7IuFNsqUx6VPK2P9OSmsYsI/YFaGil0uD21V3dM=
 github.com/imdario/mergo v0.3.15/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY=
 github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
 github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
-github.com/jfrog/terraform-provider-shared v1.30.0 h1:GUSWuB64P1d6iMitND7rGSraC69gQV5RJbP5Sq+oed0=
-github.com/jfrog/terraform-provider-shared v1.30.0/go.mod h1:b83OBWz8UINMb34aV2nENUN/T45A4cJ/HQwykCsGO+M=
+github.com/jfrog/terraform-provider-shared v1.30.1 h1:IpdaKMSec/DhSewlvYroQbORZpmnRJmMBmeQPMLkJjo=
+github.com/jfrog/terraform-provider-shared v1.30.1/go.mod h1:b83OBWz8UINMb34aV2nENUN/T45A4cJ/HQwykCsGO+M=
 github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c=
 github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo=
 github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4=
diff --git a/pkg/artifactory/resource/repository/remote/remote.go b/pkg/artifactory/resource/repository/remote/remote.go
index 5cccbe57..d015d777 100644
--- a/pkg/artifactory/resource/repository/remote/remote.go
+++ b/pkg/artifactory/resource/repository/remote/remote.go
@@ -152,25 +152,7 @@ func (r RemoteResourceModel) ToAPIModel(ctx context.Context, packageType string)
 		localRepositoryAPIModel.RepoLayoutRef = r.RepoLayoutRef.ValueString()
 	}
 
-	var contentSynchronisation ContentSynchronisation
-	elems := r.ContentSynchronisation.Elements()
-	if len(elems) > 0 {
-		attrs := elems[0].(types.Object).Attributes()
-		contentSynchronisation = ContentSynchronisation{
-			Enabled: attrs["enabled"].(types.Bool).ValueBool(),
-			Statistics: ContentSynchronisationStatistics{
-				Enabled: attrs["statistics_enabled"].(types.Bool).ValueBool(),
-			},
-			Properties: ContentSynchronisationProperties{
-				Enabled: attrs["properties_enabled"].(types.Bool).ValueBool(),
-			},
-			Source: ContentSynchronisationSource{
-				OriginAbsenceDetection: attrs["source_origin_absence_detection"].(types.Bool).ValueBool(),
-			},
-		}
-	}
-
-	return RemoteAPIModel{
+	var apiModel = RemoteAPIModel{
 		LocalAPIModel:                     localRepositoryAPIModel,
 		URL:                               r.URL.ValueString(),
 		Username:                          r.Username.ValueString(),
@@ -195,11 +177,39 @@ func (r RemoteResourceModel) ToAPIModel(ctx context.Context, packageType string)
 		EnableCookieManagement:            r.EnableCookieManagement.ValueBoolPointer(),
 		BypassHeadRequests:                r.BypassHeadRequests.ValueBoolPointer(),
 		ClientTLSCertificate:              r.ClientTLSCertificate.ValueString(),
-		ContentSynchronisation:            &contentSynchronisation,
 		MismatchingMimeTypeOverrideList:   r.MismatchingMimeTypeOverrideList.ValueString(),
 		ListRemoteFolderItems:             r.ListRemoteFolderItems.ValueBool(),
 		DisableURLNormalization:           r.DisableURLNormalization.ValueBool(),
-	}, diags
+	}
+
+	elems := r.ContentSynchronisation.Elements()
+	if len(elems) > 0 {
+		attrs := elems[0].(types.Object).Attributes()
+		contentSynchronisation := ContentSynchronisation{
+			Enabled: attrs["enabled"].(types.Bool).ValueBool(),
+			Statistics: ContentSynchronisationStatistics{
+				Enabled: attrs["statistics_enabled"].(types.Bool).ValueBool(),
+			},
+			Properties: ContentSynchronisationProperties{
+				Enabled: attrs["properties_enabled"].(types.Bool).ValueBool(),
+			},
+			Source: ContentSynchronisationSource{
+				OriginAbsenceDetection: attrs["source_origin_absence_detection"].(types.Bool).ValueBool(),
+			},
+		}
+		apiModel.ContentSynchronisation = &contentSynchronisation
+	} else {
+		// Set all attributes to their zero values (null)
+		contentSynchronisation := ContentSynchronisation{
+			Enabled:    false,
+			Statistics: ContentSynchronisationStatistics{Enabled: false},
+			Properties: ContentSynchronisationProperties{Enabled: false},
+			Source:     ContentSynchronisationSource{OriginAbsenceDetection: false},
+		}
+		apiModel.ContentSynchronisation = &contentSynchronisation
+	}
+
+	return apiModel, diags
 }
 
 var contentSynchronisationAttrType = types.ObjectType{
@@ -243,33 +253,31 @@ func (r *RemoteResourceModel) FromAPIModel(ctx context.Context, apiModel RemoteA
 	r.ClientTLSCertificate = types.StringValue(apiModel.ClientTLSCertificate)
 
 	contentSynchronisationList := types.ListNull(contentSynchronisationAttrType)
-	// only update plan/state with ContentSynchronisation from API if it is enabled
-	// not perfect conditional but we are limited by SDKv2 loosy logic for 'computed' list
-	// if apiModel.ContentSynchronisation != nil && apiModel.ContentSynchronisation.Enabled {
-	if apiModel.ContentSynchronisation != nil && apiModel.ContentSynchronisation.Enabled {
-		contentSynchronisation, ds := types.ObjectValue(
-			contentSynchronisationAttrTypes,
-			map[string]attr.Value{
-				"enabled":                         types.BoolValue(apiModel.ContentSynchronisation.Enabled),
-				"statistics_enabled":              types.BoolValue(apiModel.ContentSynchronisation.Statistics.Enabled),
-				"properties_enabled":              types.BoolValue(apiModel.ContentSynchronisation.Properties.Enabled),
-				"source_origin_absence_detection": types.BoolValue(apiModel.ContentSynchronisation.Source.OriginAbsenceDetection),
-			},
-		)
-		if ds.HasError() {
-			diags.Append(ds...)
-		}
-
-		contentSynchronisationList, ds = types.ListValue(
-			contentSynchronisationAttrType,
-			[]attr.Value{contentSynchronisation},
-		)
-
-		if ds != nil {
-			diags = append(diags, ds...)
+	if apiModel.ContentSynchronisation.Enabled {
+		if apiModel.ContentSynchronisation != nil {
+			cs := apiModel.ContentSynchronisation
+			contentSynchronisation, ds := types.ObjectValue(
+				contentSynchronisationAttrTypes,
+				map[string]attr.Value{
+					"enabled":                         types.BoolValue(cs.Enabled),
+					"statistics_enabled":              types.BoolValue(cs.Statistics.Enabled),
+					"properties_enabled":              types.BoolValue(cs.Properties.Enabled),
+					"source_origin_absence_detection": types.BoolValue(cs.Source.OriginAbsenceDetection),
+				},
+			)
+			if ds.HasError() {
+				diags.Append(ds...)
+			}
+			contentSynchronisationList, ds = types.ListValue(
+				contentSynchronisationAttrType,
+				[]attr.Value{contentSynchronisation},
+			)
+			if ds != nil {
+				diags = append(diags, ds...)
+			}
 		}
+		r.ContentSynchronisation = contentSynchronisationList
 	}
-	r.ContentSynchronisation = contentSynchronisationList
 
 	r.MismatchingMimeTypeOverrideList = types.StringValue(apiModel.MismatchingMimeTypeOverrideList)
 	r.ListRemoteFolderItems = types.BoolValue(apiModel.ListRemoteFolderItems)
@@ -304,29 +312,29 @@ type RemoteAPIModel struct {
 	EnableCookieManagement            *bool                   `json:"enableCookieManagement,omitempty"`
 	BypassHeadRequests                *bool                   `json:"bypassHeadRequests,omitempty"`
 	ClientTLSCertificate              string                  `json:"clientTlsCertificate"`
-	ContentSynchronisation            *ContentSynchronisation `json:"contentSynchronisation"`
+	ContentSynchronisation            *ContentSynchronisation `json:"contentSynchronisation,omitempty"`
 	MismatchingMimeTypeOverrideList   string                  `json:"mismatchingMimeTypesOverrideList"`
 	ListRemoteFolderItems             bool                    `json:"listRemoteFolderItems"`
 	DisableURLNormalization           bool                    `json:"disableUrlNormalization"`
 }
 
 type ContentSynchronisation struct {
-	Enabled    bool                             `json:"enabled"`
+	Enabled    bool                             `json:"enabled,omitempty"`
 	Statistics ContentSynchronisationStatistics `json:"statistics"`
 	Properties ContentSynchronisationProperties `json:"properties"`
 	Source     ContentSynchronisationSource     `json:"source"`
 }
 
 type ContentSynchronisationStatistics struct {
-	Enabled bool `hcl:"statistics_enabled" json:"enabled"`
+	Enabled bool `hcl:"statistics_enabled" json:"enabled,omitempty"`
 }
 
 type ContentSynchronisationProperties struct {
-	Enabled bool `hcl:"properties_enabled" json:"enabled"`
+	Enabled bool `hcl:"properties_enabled" json:"enabled,omitempty"`
 }
 
 type ContentSynchronisationSource struct {
-	OriginAbsenceDetection bool `hcl:"source_origin_absence_detection" json:"originAbsenceDetection"`
+	OriginAbsenceDetection bool `hcl:"source_origin_absence_detection" json:"originAbsenceDetection,omitempty"`
 }
 
 type vcsAPIModel struct {
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository.go
index 14699474..f0b7bbf0 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository.go
@@ -118,6 +118,8 @@ func (r *remoteDockerResourceModel) FromAPIModel(ctx context.Context, apiModel i
 	r.Curated = types.BoolValue(model.CurationAPIModel.Curated)
 	r.ExternalDependenciesEnabled = types.BoolValue(model.ExternalDependenciesEnabled)
 
+	r.ExternalDependenciesPatterns = types.ListNull(types.StringType)
+
 	if r.ExternalDependenciesEnabled.ValueBool() == true {
 		externalDependenciesPatterns, d := types.ListValueFrom(ctx, types.StringType, model.ExternalDependenciesPatterns)
 		if d != nil {



Test patch:
diff --git a/pkg/acctest/test.go b/pkg/acctest/test.go
index 315b61c0..b698c79a 100644
--- a/pkg/acctest/test.go
+++ b/pkg/acctest/test.go
@@ -387,6 +387,27 @@ func CompareArtifactoryVersions(t *testing.T, instanceVersions string) (bool, er
 	return skipTest, nil
 }
 
+func CompareAcessVersions(t *testing.T, instanceVersions string) (bool, error) {
+	fixedVersion, err := version.NewVersion(instanceVersions)
+	if err != nil {
+		return false, err
+	}
+
+	client := GetTestResty(t)
+	accessVersion, err := util.GetAccessVersion(client)
+
+	runtimeVersion, err := version.NewVersion(accessVersion)
+	if err != nil {
+		return false, err
+	}
+
+	skipTest := runtimeVersion.GreaterThanOrEqual(fixedVersion)
+	if skipTest {
+		t.Skipf("Test skip because: runtime version %s is same or later than %s\n", runtimeVersion.String(), fixedVersion.String())
+	}
+	return skipTest, nil
+}
+
 func SkipIfNotSupportedVersion(t *testing.T, supportedVersion string) error {
 	supported, err := version.NewVersion(supportedVersion)
 	if err != nil {
diff --git a/pkg/artifactory/resource/replication/resource_artifactory_remote_repository_replication_test.go b/pkg/artifactory/resource/replication/resource_artifactory_remote_repository_replication_test.go
index 45862a2b..7bc481b3 100644
--- a/pkg/artifactory/resource/replication/resource_artifactory_remote_repository_replication_test.go
+++ b/pkg/artifactory/resource/replication/resource_artifactory_remote_repository_replication_test.go
@@ -44,7 +44,7 @@ func TestAccRemoteRepositoryReplication_UpgradeFromSDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "11.7.0",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Config: config,
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_ansible_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_ansible_repository_test.go
index c736c710..a3cdc4cb 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_ansible_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_ansible_repository_test.go
@@ -66,7 +66,7 @@ func TestAccRemoteAnsibleRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_basic_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_basic_repository_test.go
index 2e26e3c6..662c4418 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_basic_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_basic_repository_test.go
@@ -79,7 +79,7 @@ func TestAccRemoteLikeBasicRepository_migrate_from_SDKv2(t *testing.T) {
 						ExternalProviders: map[string]resource.ExternalProvider{
 							"artifactory": {
 								Source:            "jfrog/artifactory",
-								VersionConstraint: "12.8.1",
+								VersionConstraint: "12.8.3",
 							},
 						},
 						Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_bower_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_bower_repository_test.go
index a8d4647c..52d92506 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_bower_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_bower_repository_test.go
@@ -47,7 +47,7 @@ func TestAccRemoteBowerRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cargo_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cargo_repository_test.go
index 5c3d4bb6..108a162a 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cargo_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cargo_repository_test.go
@@ -49,7 +49,7 @@ func TestAccRemoteCargoRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cocoapods_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cocoapods_repository_test.go
index 7c2b5a37..5b1c3804 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cocoapods_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_cocoapods_repository_test.go
@@ -46,7 +46,7 @@ func TestAccRemoteCocoapodsRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_composer_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_composer_repository_test.go
index 99791096..9f4921c3 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_composer_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_composer_repository_test.go
@@ -46,7 +46,7 @@ func TestAccRemoteComposerRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_conan_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_conan_repository_test.go
index be862fbb..3289bc7e 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_conan_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_conan_repository_test.go
@@ -43,7 +43,7 @@ func TestAccRemoteConanRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository_test.go
index 50e19ef9..e171b5f9 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_docker_repository_test.go
@@ -229,7 +229,7 @@ func TestAccRemoteDockerRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gems_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gems_repository_test.go
index 3dd596e2..831a7d1b 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gems_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gems_repository_test.go
@@ -41,7 +41,7 @@ func TestAccRemoteGemsRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_generic_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_generic_repository_test.go
index a864d2fb..1ead3ba6 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_generic_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_generic_repository_test.go
@@ -91,7 +91,7 @@ func TestAccRemoteGenericRepository_migrate_to_schema_v4(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				ConfigPlanChecks: resource.ConfigPlanChecks{
@@ -132,7 +132,7 @@ func TestAccRemoteGenericRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_go_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_go_repository_test.go
index 99825103..b7d60815 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_go_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_go_repository_test.go
@@ -49,7 +49,7 @@ func TestAccRemoteGoRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gradle_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gradle_repository_test.go
index a290aa4d..246fcdaa 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gradle_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_gradle_repository_test.go
@@ -59,7 +59,7 @@ func TestAccRemoteGradleRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helm_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helm_repository_test.go
index 1f48986b..37e59016 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helm_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helm_repository_test.go
@@ -69,7 +69,7 @@ func TestAccRemoteHelmRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helmoci_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helmoci_repository_test.go
index 204fdbea..7f421c8b 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helmoci_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_helmoci_repository_test.go
@@ -47,7 +47,7 @@ func TestAccRemoteHelmOCIRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_huggingfaceml_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_huggingfaceml_repository_test.go
index 31dcbcd3..98becbf8 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_huggingfaceml_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_huggingfaceml_repository_test.go
@@ -65,7 +65,7 @@ func TestAccRemoteHuggingFaceRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_npm_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_npm_repository_test.go
index 2c038d68..9f5d5c5c 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_npm_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_npm_repository_test.go
@@ -45,7 +45,7 @@ func TestAccRemoteNPMRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_nuget_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_nuget_repository_test.go
index 0deb3ad7..ac12368d 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_nuget_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_nuget_repository_test.go
@@ -48,7 +48,7 @@ func TestAccRemoteNugetRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_oci_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_oci_repository_test.go
index e977afa7..52043477 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_oci_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_oci_repository_test.go
@@ -47,7 +47,7 @@ func TestAccRemoteOCIRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_pypi_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_pypi_repository_test.go
index af3d1713..179b5506 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_pypi_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_pypi_repository_test.go
@@ -45,7 +45,7 @@ func TestAccRemotePyPIRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_repository_test.go
index b5b93faa..872a706b 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_repository_test.go
@@ -72,11 +72,25 @@ func TestAccRemoteUpgradeFromVersionWithNoDisableProxyAttr(t *testing.T) {
 					},
 				},
 			},
+			{
+				ExternalProviders: map[string]resource.ExternalProvider{
+					"artifactory": {
+						VersionConstraint: "12.8.3",
+						Source:            "jfrog/artifactory",
+					},
+				},
+				Config: config,
+				ConfigPlanChecks: resource.ConfigPlanChecks{
+					PreApply: []plancheck.PlanCheck{
+						plancheck.ExpectEmptyPlan(),
+					},
+				},
+			},
 			{
 				// Plugin Framework UpgradeState is not implemented in remoteResource for schema v2 to v3
 				// due to Golang/Terraform type complexity.
 				// Instead user/practitioner should upgrade from v8 to v12.8.0 (last version in SDKv2 with state upgrade) first
-				// then upgrade to >12.8.1
+				// then upgrade to 12.8.3 and then upgrade to >12.8.3
 				ProtoV6ProviderFactories: acctest.ProtoV6ProviderFactories,
 				Config:                   config,
 				ConfigPlanChecks: resource.ConfigPlanChecks{
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_terraform_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_terraform_repository_test.go
index b5beb9d7..ac41a38a 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_terraform_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_terraform_repository_test.go
@@ -47,7 +47,7 @@ func TestAccRemoteTerraformRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(
diff --git a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_vcs_repository_test.go b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_vcs_repository_test.go
index 18eaff19..cbd2e1ef 100644
--- a/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_vcs_repository_test.go
+++ b/pkg/artifactory/resource/repository/remote/resource_artifactory_remote_vcs_repository_test.go
@@ -56,7 +56,7 @@ func TestAccRemoteVCSRepository_migrate_from_SDKv2(t *testing.T) {
 				ExternalProviders: map[string]resource.ExternalProvider{
 					"artifactory": {
 						Source:            "jfrog/artifactory",
-						VersionConstraint: "12.8.1",
+						VersionConstraint: "12.8.3",
 					},
 				},
 				Check: resource.ComposeTestCheckFunc(