Skip to content

Commit

Permalink
Fix Schema config column parsing and hashed read from tf file (#348)
Browse files Browse the repository at this point in the history
* Fix Schema config column parsing and hashed read from tf file

* Add change log and update version

* Fix versions
  • Loading branch information
fivetran-jovanmanojlovic authored Aug 27, 2024
1 parent ce2b720 commit 76bc18d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ 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.2.7...HEAD)
## [Unreleased](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.2.8...HEAD)

## [1.2.8](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.2.7...v1.2.8)

## Fixed
- Issue with connector schema config columns update
- Issue with connector schema config columns' hashed value being required in the .tf file

## [1.2.7](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.2.6...v1.2.7)

Expand Down
2 changes: 1 addition & 1 deletion fivetran/framework/core/model/connector_schema_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func (d *ConnectorSchemaResourceModel) getSchemasRaw() []interface{} {
if sm, ok := tMap["sync_mode"]; ok {
table["sync_mode"] = sm
}
if c, ok := tMap["tables"]; ok {
if c, ok := tMap["columns"]; ok {
columns := []interface{}{}
if rawColumns, ok := c.(map[string]interface{}); ok {
for cName, ci := range rawColumns {
Expand Down
2 changes: 1 addition & 1 deletion fivetran/framework/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/hashicorp/terraform-plugin-framework/types"
)

const Version = "1.2.3" // Current provider version
const Version = "1.2.8" // Current provider version

type fivetranProvider struct {
mockClient httputils.HttpClient
Expand Down
2 changes: 1 addition & 1 deletion modules/connector/schema/schema_column.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (c _column) toStateObject(sch string, local *_column, diag *diag.Diagnostic

result[NAME] = c.name

if c.hashed != nil {
if local != nil && local.hashed != nil && c.hashed != nil {
result[HASHED] = helpers.BoolToStr(*c.hashed)
}
return result, local != nil ||
Expand Down

0 comments on commit 76bc18d

Please sign in to comment.