Skip to content

Commit

Permalink
Fix problem with schema_change_handling validation for SAP connecto…
Browse files Browse the repository at this point in the history
…rs (#376)
  • Loading branch information
fivetran-jovanmanojlovic authored Nov 15, 2024
1 parent 6514d6a commit 250421a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 3 additions & 1 deletion fivetran/framework/core/model/connector_schema_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}

Expand Down

0 comments on commit 250421a

Please sign in to comment.