Skip to content

Commit

Permalink
Add missing field in External Logging (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-aleksandrboldyrev authored Jan 12, 2024
1 parent 26f067e commit fd9da2a
Show file tree
Hide file tree
Showing 30 changed files with 93 additions and 866 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.1.6...HEAD)
## [Unreleased](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.1.7...HEAD)

## [1.1.7](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.1.5...v1.1.7)

- Resource `fivetran_external_logging` fields support:
- Added field `fivetran_external_logging.config.project_id`.
- Deprecated data sources `fivetran_metadata_schemas`, `fivetran_metadata_tables`, `fivetran_metadata_columns` removed.

## [1.1.6](https://github.com/fivetran/terraform-provider-fivetran/compare/v1.1.5...v1.1.6)

Expand Down
1 change: 1 addition & 0 deletions docs/data-sources/external_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Optional:
- `log_group_name` (String) Log Group Name
- `port` (Number) Port
- `primary_key` (String, Sensitive) Primary Key
- `project_id` (String) Project Id for Google Cloud Logging
- `region` (String) Region
- `role_arn` (String) Role Arn
- `sub_domain` (String) Sub Domain
Expand Down
39 changes: 0 additions & 39 deletions docs/data-sources/metadata_columns.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/data-sources/metadata_schemas.md

This file was deleted.

35 changes: 0 additions & 35 deletions docs/data-sources/metadata_tables.md

This file was deleted.

1 change: 1 addition & 0 deletions docs/resources/external_logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Optional:
- `log_group_name` (String) Log Group Name
- `port` (Number) Port
- `primary_key` (String, Sensitive) Primary Key
- `project_id` (String) Project Id for Google Cloud Logging
- `region` (String) Region
- `role_arn` (String) Role Arn
- `sub_domain` (String) Sub Domain
Expand Down
13 changes: 7 additions & 6 deletions fivetran/data_source_connectors_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"

"github.com/fivetran/go-fivetran"
"github.com/fivetran/go-fivetran/connectors"
"github.com/fivetran/terraform-provider-fivetran/modules/helpers"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
Expand Down Expand Up @@ -88,9 +89,9 @@ func dataSourceConnectorsMetadataRead(ctx context.Context, d *schema.ResourceDat
return diags
}

// dataSourceConnectorsMetadataFlattenMetadata receives a *fivetran.ConnectorsSourceMetadataResponse and returns a []interface{}
// dataSourceConnectorsMetadataFlattenMetadata receives a *connectors.ConnectorsSourceMetadataResponse and returns a []interface{}
// containing the data type accepted by the "sources" set.
func dataSourceConnectorsMetadataFlattenMetadata(resp *fivetran.ConnectorsSourceMetadataResponse) []interface{} {
func dataSourceConnectorsMetadataFlattenMetadata(resp *connectors.ConnectorsSourceMetadataResponse) []interface{} {
if resp.Data.Items == nil {
return make([]interface{}, 0)
}
Expand All @@ -113,13 +114,13 @@ func dataSourceConnectorsMetadataFlattenMetadata(resp *fivetran.ConnectorsSource
}

// dataSourceConnectorsMetadataGetMetadata gets the connectors source metadata. It handles limits and cursors.
func dataSourceConnectorsMetadataGetMetadata(client *fivetran.Client, ctx context.Context) (fivetran.ConnectorsSourceMetadataResponse, error) {
var resp fivetran.ConnectorsSourceMetadataResponse
func dataSourceConnectorsMetadataGetMetadata(client *fivetran.Client, ctx context.Context) (connectors.ConnectorsSourceMetadataResponse, error) {
var resp connectors.ConnectorsSourceMetadataResponse
var respNextCursor string

for {
var err error
var respInner fivetran.ConnectorsSourceMetadataResponse
var respInner connectors.ConnectorsSourceMetadataResponse
svc := client.NewConnectorsSourceMetadata()
if respNextCursor == "" {
respInner, err = svc.Limit(limit).Do(ctx)
Expand All @@ -128,7 +129,7 @@ func dataSourceConnectorsMetadataGetMetadata(client *fivetran.Client, ctx contex
respInner, err = svc.Limit(limit).Cursor(respNextCursor).Do(ctx)
}
if err != nil {
return fivetran.ConnectorsSourceMetadataResponse{}, err
return connectors.ConnectorsSourceMetadataResponse{}, err
}

resp.Data.Items = append(resp.Data.Items, respInner.Data.Items...)
Expand Down
152 changes: 0 additions & 152 deletions fivetran/data_source_metadata_columns.go

This file was deleted.

Loading

0 comments on commit fd9da2a

Please sign in to comment.