Skip to content

feat(gcp): Fetch Only enabled services#5534

Merged
kodiakhq[bot] merged 43 commits intocloudquery:mainfrom
bbernays:gcp-enabled-services
Dec 22, 2022
Merged

feat(gcp): Fetch Only enabled services#5534
kodiakhq[bot] merged 43 commits intocloudquery:mainfrom
bbernays:gcp-enabled-services

Conversation

@bbernays
Copy link
Copy Markdown
Collaborator

@bbernays bbernays commented Dec 10, 2022

Summary

  • Creates a new multiplexer option that enables users to skip the resource if the service has not been determined that it is enabled client.ProjectMultiplexEnabledServices
  • Provide an opt-in method for filtering out resources/projects that are not enabled

@cq-bot cq-bot removed the aws label Dec 12, 2022
@bbernays bbernays changed the title Gcp enabled services feat!: Fetch Only enabled services Dec 12, 2022
@bbernays bbernays marked this pull request as ready for review December 12, 2022 15:31
@bbernays bbernays changed the title feat!: Fetch Only enabled services feat: Fetch Only enabled services Dec 12, 2022
@bbernays bbernays changed the title feat: Fetch Only enabled services feat(gcp): Fetch Only enabled services Dec 12, 2022
@bbernays bbernays requested a review from erezrokah December 14, 2022 18:02
Copy link
Copy Markdown
Contributor

@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.

LGTM. two minor comments.

package client

var GcpServices = map[string]bool{
"apikeys.googleapis.com": true,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we make those consts and then add this to the array. Similar how this is done https://github.com/cloudquery/cloudquery/blob/main/plugins/source/azure/client/namespaces.go

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think that const would make any sort of improvement because we are still just dealing with strings in the codegen recipes...

In a future PR I would like to autogenerate this whole map like we do with the AWS data json file

@disq disq self-requested a review December 21, 2022 12:31
@bbernays bbernays requested a review from yevgenypats December 22, 2022 17:44
@bbernays bbernays added the automerge Automatically merge once required checks pass label Dec 22, 2022
@bbernays bbernays dismissed disq’s stale review December 22, 2022 20:54

Addressed concerns

@kodiakhq kodiakhq bot merged commit 667b567 into cloudquery:main Dec 22, 2022
@bbernays bbernays deleted the gcp-enabled-services branch December 22, 2022 20:54
kodiakhq bot pushed a commit that referenced this pull request Dec 27, 2022
🤖 I have created a release *beep* *boop*
---


## [5.3.0](plugins-source-gcp-v5.2.0...plugins-source-gcp-v5.3.0) (2022-12-27)


### Features

* **gcp:** Fetch Only enabled services ([#5534](#5534)) ([667b567](667b567))
* **resources:** Add API Gateway ([#5926](#5926)) ([7bb33a8](7bb33a8))


### Bug Fixes

* **deps:** Update module github.com/cloudquery/plugin-sdk to v1.13.1 ([#5897](#5897)) ([ad15915](ad15915))
* **gcp:** List locations before getting run services ([#5919](#5919)) ([7581466](7581466))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
kodiakhq bot pushed a commit that referenced this pull request Dec 28, 2022

#### Summary

Follow up to #5534.

In most cases `ServiceDNS` can be inferred from `Service` (not sure but we might want to update `Service` when it doesn't)

<!--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants