Skip to content

Commit

Permalink
Add missing folder_id to connector config (#20)
Browse files Browse the repository at this point in the history
* switch to go-fivetran 0.5.5

* Add folder_id to connector config schema

* Add folder_id to changelog

* Fix changelog
  • Loading branch information
beevital authored Apr 20, 2022
1 parent 1f9ada7 commit 7f4d267
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/fivetran/terraform-provider-fivetran/compare/v0.3.5...HEAD)

## [0.3.5](https://github.com/fivetran/terraform-provider-fivetran/compare/v0.3.4...v0.3.5) - 2022-04-05
## [0.3.5](https://github.com/fivetran/terraform-provider-fivetran/compare/v0.3.4...v0.3.5) - 2022-04-20

## Fixed
- `ConnectorConfigRequest.AlwaysEncrypted` missing field added
- `ConnectorConfigRequest.FolderId` missing field added

## [0.3.4](https://github.com/fivetran/terraform-provider-fivetran/compare/v0.3.3...v0.3.4) - 2022-02-22

Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ Read-Only:
- `file_type`
- `finance_account_sync_mode`
- `finance_accounts`
- `folder_id`
- `ftp_host`
- `ftp_password`
- `ftp_port`
Expand Down
1 change: 1 addition & 0 deletions docs/resources/connector.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Optional:
- `file_type`
- `finance_account_sync_mode`
- `finance_accounts`
- `folder_id`
- `ftp_host`
- `ftp_password`
- `ftp_port`
Expand Down
2 changes: 2 additions & 0 deletions fivetran/data_source_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func dataSourceConnectorSchemaConfig() *schema.Schema {
"s3role_arn": {Type: schema.TypeString, Computed: true},
"abs_connection_string": {Type: schema.TypeString, Computed: true},
"abs_container_name": {Type: schema.TypeString, Computed: true},
"folder_id": {Type: schema.TypeString, Computed: true},
"ftp_host": {Type: schema.TypeString, Computed: true},
"ftp_port": {Type: schema.TypeString, Computed: true},
"ftp_user": {Type: schema.TypeString, Computed: true},
Expand Down Expand Up @@ -436,6 +437,7 @@ func dataSourceConnectorReadConfig(resp *fivetran.ConnectorDetailsResponse) []in
mapAddStr(c, "s3role_arn", resp.Data.Config.S3RoleArn)
mapAddStr(c, "abs_connection_string", resp.Data.Config.ABSConnectionString)
mapAddStr(c, "abs_container_name", resp.Data.Config.ABSContainerName)
mapAddStr(c, "folder_id", resp.Data.Config.FolderId)
mapAddStr(c, "ftp_host", resp.Data.Config.FTPHost)
mapAddStr(c, "ftp_port", intPointerToStr(resp.Data.Config.FTPPort))
mapAddStr(c, "ftp_user", resp.Data.Config.FTPUser)
Expand Down
5 changes: 5 additions & 0 deletions fivetran/resource_connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func resourceConnectorSchemaConfig() *schema.Schema {
"s3role_arn": {Type: schema.TypeString, Optional: true},
"abs_connection_string": {Type: schema.TypeString, Optional: true},
"abs_container_name": {Type: schema.TypeString, Optional: true},
"folder_id": {Type: schema.TypeString, Optional: true},
"ftp_host": {Type: schema.TypeString, Optional: true},
"ftp_port": {Type: schema.TypeString, Optional: true},
"ftp_user": {Type: schema.TypeString, Optional: true},
Expand Down Expand Up @@ -567,6 +568,9 @@ func resourceConnectorCreateConfig(config []interface{}, schema string) *fivetra
if v := c["abs_container_name"].(string); v != "" {
fivetranConfig.ABSContainerName(v)
}
if v := c["folder_id"].(string); v != "" {
fivetranConfig.FolderId(v)
}
if v := c["ftp_host"].(string); v != "" {
fivetranConfig.FTPHost(v)
}
Expand Down Expand Up @@ -1363,6 +1367,7 @@ func resourceConnectorReadConfig(resp *fivetran.ConnectorDetailsResponse, curren
mapAddStr(c, "s3role_arn", resp.Data.Config.S3RoleArn)
mapAddStr(c, "abs_connection_string", resp.Data.Config.ABSConnectionString)
mapAddStr(c, "abs_container_name", resp.Data.Config.ABSContainerName)
mapAddStr(c, "folder_id", resp.Data.Config.FolderId)
mapAddStr(c, "ftp_host", resp.Data.Config.FTPHost)
mapAddStr(c, "ftp_port", intPointerToStr(resp.Data.Config.FTPPort))
mapAddStr(c, "ftp_user", resp.Data.Config.FTPUser)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/fivetran/terraform-provider-fivetran

require (
github.com/fivetran/go-fivetran v0.5.4
github.com/fivetran/go-fivetran v0.5.5
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.0
github.com/mattn/go-colorable v0.1.8 // indirect
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fivetran/go-fivetran v0.5.4 h1:JoN+fbh4wHX43jpC6NLPcs+qOs3Gtdc/csvkgVTG9FM=
github.com/fivetran/go-fivetran v0.5.4/go.mod h1:VZveAoj9lWCyGDuBRRbTU4M4j9sjjsAUBQIZld+J4Uc=
github.com/fivetran/go-fivetran v0.5.5 h1:2ownxuXnFmLnSuz0CVg0w7kXgZ3K8nT0YZMob9E+ZJo=
github.com/fivetran/go-fivetran v0.5.5/go.mod h1:VZveAoj9lWCyGDuBRRbTU4M4j9sjjsAUBQIZld+J4Uc=
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
Expand Down

0 comments on commit 7f4d267

Please sign in to comment.