Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

feat!: Support both YAML and HCL config #332

Merged
merged 14 commits into from
Jun 21, 2022
Merged

Conversation

disq
Copy link
Member

@disq disq commented Jun 13, 2022

No description provided.

provider/provider.go Outdated Show resolved Hide resolved
Copy link
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, didn't approve as this is a draft, added some of my thoughts, tell me what you think :)

provider/provider_test.go Outdated Show resolved Hide resolved
provider/provider.go Show resolved Hide resolved
@disq disq force-pushed the feat/support-yaml-config-with-hcl branch from 6bfb801 to 7949b66 Compare June 16, 2022 15:36
Copy link
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, obviously not finished, but didn't have much comments one nit. yaml.Node is a great solution.

provider/provider.go Show resolved Hide resolved
@disq disq marked this pull request as ready for review June 16, 2022 15:52
@disq disq requested a review from a team as a code owner June 16, 2022 15:52
@disq disq requested review from erezrokah and removed request for a team June 16, 2022 15:52
provider/provider.go Outdated Show resolved Hide resolved
Copy link
Member

@yevgenypats yevgenypats left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. just had one question/clarification.

@disq disq requested a review from bbernays June 16, 2022 21:21
provider/provider.go Outdated Show resolved Hide resolved
Copy link
Contributor

@roneli roneli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, no further comments :)

@disq disq force-pushed the feat/support-yaml-config-with-hcl branch from a3654e7 to 0dcdd27 Compare June 20, 2022 12:37
@disq
Copy link
Member Author

disq commented Jun 20, 2022

the only problem here is, it doesn't seem to bring commented/example config from the provider into the file.

@disq disq changed the title feat!: Support YAML config with HCL feat!: Support both YAML and HCL config Jun 21, 2022
@disq disq merged commit 2818697 into main Jun 21, 2022
@disq disq deleted the feat/support-yaml-config-with-hcl branch June 21, 2022 08:36
kodiakhq bot pushed a commit to cloudquery/cq-provider-azure that referenced this pull request Jun 22, 2022
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
#...
```
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants