diff --git a/CHANGELOG.md b/CHANGELOG.md index 25c71d72..ce38b02e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,17 +5,16 @@ 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). -## [v0.6.0-rc1] - 2021-12-29 +## [v0.6.0] - 2021-12-31 + ### :gear: Changed -* **Breaking Change**: changed column attribute `IgnoreInTests` to `IgnoreInTests` API [#138](https://github.com/cloudquery/cq-provider-sdk/pull/137) +* **Breaking Change**: changed `TestResource` API [#137](https://github.com/cloudquery/cq-provider-sdk/pull/137) ### :rocket: Added * Added `SkipEmptyColumn` and `SkipEmptyRows` to `ResourceTestCase` * If test fail it will print what are the missing columns as well. - -## [v0.6.0-beta] - 2021-12-29 -### :gear: Changed -* **Breaking Change**: changed `TestResource` API [#137](https://github.com/cloudquery/cq-provider-sdk/pull/137) +* Added attribute `IgnoreInTests` to column API [#138](https://github.com/cloudquery/cq-provider-sdk/pull/137) +* `ConfigureProvider` now supports standard `hcl` byte streamq ## [v0.5.7]- 2021-12-20 diff --git a/provider/provider.go b/provider/provider.go index 3ebd6e15..0fa4b112 100644 --- a/provider/provider.go +++ b/provider/provider.go @@ -117,8 +117,12 @@ func (p *Provider) ConfigureProvider(_ context.Context, request *cqproto.Configu if len(request.Config) == 0 { p.Logger.Info("Received empty configuration, using only defaults") } else if err := hclsimple.Decode("config.hcl", request.Config, nil, providerConfig); err != nil { - p.Logger.Error("Failed to load configuration.", "error", err) - return &cqproto.ConfigureProviderResponse{}, err + p.Logger.Warn("Failed to read config as hcl, will try as json", "error", err) + // this part will be deprecated. + if err := hclsimple.Decode("config.json", request.Config, nil, providerConfig); err != nil { + p.Logger.Error("Failed to load configuration.", "error", err) + return &cqproto.ConfigureProviderResponse{}, err + } } client, err := p.Configure(p.Logger, providerConfig)