From 250421ae85dde1831d20204bdf631378c2070c96 Mon Sep 17 00:00:00 2001 From: Jovan Manojlovic <152610450+fivetran-jovanmanojlovic@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:55:23 +0100 Subject: [PATCH] Fix problem with `schema_change_handling` validation for SAP connectors (#376) --- CHANGELOG.md | 7 ++++++- fivetran/framework/core/model/connector_schema_config.go | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b7ddf7e..fc5e6ad2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.4.0...HEAD) +## [Unreleased](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.4.1...HEAD) + +## [1.4.1](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.4.0...v1.4.1) + +## Fixed +- Problem with `schema_change_handling` validation for SAP connectors ## [1.4.0](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.3.2...v1.4.0) diff --git a/fivetran/framework/core/model/connector_schema_config.go b/fivetran/framework/core/model/connector_schema_config.go index 6607968f..c0768820 100644 --- a/fivetran/framework/core/model/connector_schema_config.go +++ b/fivetran/framework/core/model/connector_schema_config.go @@ -95,8 +95,10 @@ func (d *ConnectorSchemaResourceModel) ReadFromResponse(response connectors.Conn } // SAP connectors will not accept schemaChangeHandling in request and will return ALLOW_COLUMNS as default - if d.SchemaChangeHandling.IsNull() || d.SchemaChangeHandling.IsUnknown() || d.SchemaChangeHandling.ValueString() != "" { + if !d.SchemaChangeHandling.IsNull() && !d.SchemaChangeHandling.IsUnknown() && d.SchemaChangeHandling.ValueString() != "" { d.SchemaChangeHandling = types.StringValue(response.Data.SchemaChangeHandling) + } else { + d.SchemaChangeHandling = types.StringNull() } }