From d2d6ea7223107fc666621cd78e665329f1eb6623 Mon Sep 17 00:00:00 2001 From: Alex Hung Date: Fri, 13 Sep 2024 10:24:33 -0700 Subject: [PATCH] Fix state drift detection in acceptance test Update CHANGELOG with BREAKING CHANGES note --- CHANGELOG.md | 4 ++-- ...urce_artifactory_remote_repository_replication_test.go | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebcd70f34..72be3b168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,8 @@ ## 12.0.0 (September 16, 2024) -BUG FIXES: +BREAKING CHANGES: -* resource/artifactory_remote_\*\_repository: Fix mismatch between documentation and actual default vaule for `list_remote_folder_items` attribute. PR: [#1072](https://github.com/jfrog/terraform-provider-artifactory/pull/1072) +* resource/artifactory_remote_\*\_repository: Fix mismatch between documentation and actual default vaule for `list_remote_folder_items` attribute. This will also match the change (default to `false`) introduced to the REST API in Artifactory v7.94.0. **Note:** Due to limitation of the Terraform SDKv2 framework, it is not possible to detect the attribute was not set and the state has the (previous) default value of `true`, then automaticaly upgrades it to `false`. Therefore this update will introduce state drift if this attribute is not set in your configuration. Use `terraform apply -refresh-only` to update your Terraform states to match. PR: [#1072](https://github.com/jfrog/terraform-provider-artifactory/pull/1072) ## 11.9.2 (September 12, 2024). Tested on Artifactory 7.90.10 with Terraform 1.9.5 and OpenTofu 1.8.2 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 a37321781..55ee0e8e5 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 @@ -5,7 +5,6 @@ import ( "testing" "github.com/hashicorp/terraform-plugin-testing/helper/resource" - "github.com/hashicorp/terraform-plugin-testing/plancheck" "github.com/hashicorp/terraform-plugin-testing/terraform" "github.com/jfrog/terraform-provider-artifactory/v11/pkg/acctest" "github.com/jfrog/terraform-provider-shared/testutil" @@ -60,11 +59,8 @@ func TestAccRemoteRepositoryReplication_UpgradeFromSDKv2(t *testing.T) { { ProtoV6ProviderFactories: acctest.ProtoV6MuxProviderFactories, Config: config, - ConfigPlanChecks: resource.ConfigPlanChecks{ - PreApply: []plancheck.PlanCheck{ - plancheck.ExpectEmptyPlan(), - }, - }, + PlanOnly: true, + ConfigPlanChecks: testutil.ConfigPlanChecks("artifactory_remote_repository_replication"), }, }, })