Conversation
|
I don't think we should be removing |
Why not introduce a converter? Otherwise the code gets very complicated (especially provider config logic in the SDK) |
|
I also not sure about having two code bases and bug types to support - what is the value of customers upgrading at their own pace? eventually we will have to deprecate anyway. I think converter might be a better take and even that I think it should be a big deal to run |
12fd8cd to
87356fc
Compare
|
cloudquery:
providers:
- name: test
version: latest
connection:
type: postgres
username: postgres
password: pass
host: localhost
port: 15432
database: postgres
sslmode: disable
providers:
# provider configurations
test:
account:
name: "1"
id: testid
regions:
- asdas
resources:
# list of resources to fetch
- slow_resource
- very_slow_resource
- error_resource
- panic_resource
- migrate_resourcemoving the comments above the list entries is complicated, not sure if it's even possible without getting dirty (dirtier). The problem is, |
|
Nice! Going to run locally and play with so I can give a more thorough review but one nit in the meanwhile. I think given it will be a breaking change the default should be the yaml generator and if someone want to use the old hcl format he will need to use the flag. This way more users will migrate faster and we can deprecate hcl faster. |
roneli
left a comment
There was a problem hiding this comment.
Looks good, two comments :)
e659ad7 to
7aa7905
Compare
5daf4a2 to
d5096bf
Compare
This reverts commit 676f44b.
40f15ef to
b6d9445
Compare
🤖 I have created a release *beep* *boop* --- ## [0.27.0-rc1](v0.26.4...v0.27.0-rc1) (2022-06-21) ### ⚠ BREAKING CHANGES * Remove drift (#887) ### Features * Remove drift ([#887](#887)) ([3d387bd](3d387bd)) ### Miscellaneous Chores * Release 0.27.0-rc1 ([#962](#962)) ([3a2ec6d](3a2ec6d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
🤖 I have created a release *beep* *boop* --- ## [0.27.0](v0.26.4...v0.27.0) (2022-06-22) ### ⚠ BREAKING CHANGES * Remove drift (#887) ### Features * Remove drift ([#887](#887)) ([3d387bd](3d387bd)) * Add YAML configuration support ([#887](#887)) ([3d387bd](3d387bd)) ### Bug Fixes * Default alias to name ([#966](#966)) ([706447c](706447c)) * Support modules tag in config ([#965](#965)) ([379344f](379344f)) * **deps:** Update module github.com/cloudquery/cq-provider-sdk to v0.12.1 ([#972](#972)) ([1f871e9](1f871e9)) * Request correct config format (YAML) from provider ([#968](#968)) ([999b68d](999b68d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
to go with cloudquery/cq-provider-sdk#332 and cloudquery/cloudquery#887 `go run main.go init azure --config config.yml` creates this: ```yaml cloudquery: providers: - name: azure version: latest connection: type: postgres username: postgres password: pass host: localhost port: 5432 database: postgres sslmode: disable providers: # provider configurations - name: azure # Optional. if you not specified, cloudquery tries to access all subscriptions available to tenant # subscriptions: # - <YOUR_SUBSCRIPTION_ID_HERE> # # list of resources to fetch resources: - account.locations - authorization.role_assignments #... ```
to go with cloudquery/cq-provider-sdk#332 and #887 `go run main.go init okta --config config.yml` creates this: ```yaml cloudquery: providers: - name: okta version: latest connection: type: postgres username: postgres password: pass host: localhost port: 5432 database: postgres sslmode: disable providers: # provider configurations - name: okta # Optional. Okta Token to access API, you can set this with OKTA_API_TOKEN env variable # token = <YOUR_OKTA_TOKEN> # Required. You okta domain name # domain = https://<CHANGE_THIS_TO_YOUR_OKTA_DOMAIN>.okta.com # # list of resources to fetch resources: - users ```
to go with cloudquery/cq-provider-sdk#332 and #887 `go run main.go init azure --config config.yml` creates this: ```yaml cloudquery: providers: - name: azure version: latest connection: type: postgres username: postgres password: pass host: localhost port: 5432 database: postgres sslmode: disable providers: # provider configurations - name: azure # Optional. if you not specified, cloudquery tries to access all subscriptions available to tenant # subscriptions: # - <YOUR_SUBSCRIPTION_ID_HERE> # # list of resources to fetch resources: - account.locations - authorization.role_assignments #... ```
Continued from #752
cq initshould generate yamlGetProviderConfig)policies will need updating/convertingcq initshould get yaml config from providers and correctly inject it?