diff --git a/CHANGELOG.md b/CHANGELOG.md index b605c10..9d4d7ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.2 (unreleased) + +- Fix issue with `ise_repository` triggers in-place upgrade when no changes are made #59 + ## 0.2.1 - Make `groupId` attribute of `ise_endpoint` resource optional diff --git a/docs/guides/changelog.md b/docs/guides/changelog.md index 2c25959..7642546 100644 --- a/docs/guides/changelog.md +++ b/docs/guides/changelog.md @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.2.2 (unreleased) + +- Fix issue with `ise_repository` triggers in-place upgrade when no changes are made #59 + ## 0.2.1 - Make `groupId` attribute of `ise_endpoint` resource optional diff --git a/gen/definitions/repository.yaml b/gen/definitions/repository.yaml index 6242600..5e36d38 100644 --- a/gen/definitions/repository.yaml +++ b/gen/definitions/repository.yaml @@ -37,5 +37,6 @@ attributes: example: cisco123 - model_name: enablePki type: Bool + write_only: true description: Enable PKI example: false diff --git a/internal/provider/data_source_ise_repository_test.go b/internal/provider/data_source_ise_repository_test.go index f3b70ec..d5a4511 100644 --- a/internal/provider/data_source_ise_repository_test.go +++ b/internal/provider/data_source_ise_repository_test.go @@ -36,7 +36,6 @@ func TestAccDataSourceIseRepository(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("data.ise_repository.test", "path", "/dir")) checks = append(checks, resource.TestCheckResourceAttr("data.ise_repository.test", "server_name", "server1")) checks = append(checks, resource.TestCheckResourceAttr("data.ise_repository.test", "user_name", "user9")) - checks = append(checks, resource.TestCheckResourceAttr("data.ise_repository.test", "enable_pki", "false")) resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, ProtoV6ProviderFactories: testAccProtoV6ProviderFactories, diff --git a/internal/provider/model_ise_repository.go b/internal/provider/model_ise_repository.go index eb89130..0b74670 100644 --- a/internal/provider/model_ise_repository.go +++ b/internal/provider/model_ise_repository.go @@ -111,11 +111,6 @@ func (data *Repository) fromBody(ctx context.Context, res gjson.Result) { } else { data.UserName = types.StringNull() } - if value := res.Get("response.enablePki"); value.Exists() { - data.EnablePki = types.BoolValue(value.Bool()) - } else { - data.EnablePki = types.BoolNull() - } } //template:end fromBody @@ -147,11 +142,6 @@ func (data *Repository) updateFromBody(ctx context.Context, res gjson.Result) { } else { data.UserName = types.StringNull() } - if value := res.Get("response.enablePki"); value.Exists() && !data.EnablePki.IsNull() { - data.EnablePki = types.BoolValue(value.Bool()) - } else { - data.EnablePki = types.BoolNull() - } } //template:end updateFromBody diff --git a/internal/provider/resource_ise_repository_test.go b/internal/provider/resource_ise_repository_test.go index ef973c7..646c546 100644 --- a/internal/provider/resource_ise_repository_test.go +++ b/internal/provider/resource_ise_repository_test.go @@ -37,7 +37,6 @@ func TestAccIseRepository(t *testing.T) { checks = append(checks, resource.TestCheckResourceAttr("ise_repository.test", "path", "/dir")) checks = append(checks, resource.TestCheckResourceAttr("ise_repository.test", "server_name", "server1")) checks = append(checks, resource.TestCheckResourceAttr("ise_repository.test", "user_name", "user9")) - checks = append(checks, resource.TestCheckResourceAttr("ise_repository.test", "enable_pki", "false")) var steps []resource.TestStep if os.Getenv("SKIP_MINIMUM_TEST") == "" { diff --git a/templates/guides/changelog.md.tmpl b/templates/guides/changelog.md.tmpl index 2c25959..7642546 100644 --- a/templates/guides/changelog.md.tmpl +++ b/templates/guides/changelog.md.tmpl @@ -7,6 +7,10 @@ description: |- # Changelog +## 0.2.2 (unreleased) + +- Fix issue with `ise_repository` triggers in-place upgrade when no changes are made #59 + ## 0.2.1 - Make `groupId` attribute of `ise_endpoint` resource optional