Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2 resource ingest #902

Merged
merged 12 commits into from
Mar 9, 2023
Merged

V2 resource ingest #902

merged 12 commits into from
Mar 9, 2023

Conversation

deviprasad303
Copy link
Contributor

Fixes # .

Changes proposed in this pull request:

@deepfence/engineering

@@ -100,6 +110,14 @@ func (tc *CloudComplianceIngester) LinkNodesWithCloudResources(ctx context.Conte
return err
}

if _, err = tx.Run("match (n:Node) WITH apoc.convert.fromJsonMap(n.cloud_metadata) as map, n WHERE map.label = 'GCP' WITH map.hostname as hostname, n match (m:CloudResource) where m.resource_type = 'gcp_compute_instance' and m.hostname = hostname MERGE (n) -[:IS]-> (m)", map[string]interface{}{}); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Instead of using "query" we can use ``
That way we can format the query a bit better and make it readable, like:

`
MATCH (n)
RETURN n
`

@deviprasad303 deviprasad303 merged commit 62f2a4b into v2 Mar 9, 2023
@deviprasad303 deviprasad303 deleted the v2-resource-ingest branch March 9, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants