This repository has been archived by the owner on Jun 25, 2024. It is now read-only.
generated from JupiterOne-Archives/integration-template
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(INT-5918): add cloud function source repo relationship
- Loading branch information
Gaston Yelmini
authored and
Gaston Yelmini
committed
Oct 31, 2022
1 parent
ca2cca1
commit b5d4a54
Showing
7 changed files
with
133 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,49 @@ | ||
import { RelationshipClass } from '@jupiterone/integration-sdk-core'; | ||
import { IAM_SERVICE_ACCOUNT_ENTITY_TYPE } from '../iam'; | ||
|
||
export const CLOUD_FUNCTION_ENTITY_CLASS = 'Function'; | ||
export const CLOUD_FUNCTION_ENTITY_TYPE = 'google_cloud_function'; | ||
|
||
export const STEP_CLOUD_FUNCTIONS = 'fetch-cloud-functions'; | ||
export const STEP_CLOUD_FUNCTIONS_SERVICE_ACCOUNT_RELATIONSHIPS = | ||
'build-cloud-function-service-account-relationships'; | ||
export const STEP_CLOUD_FUNCTIONS_SOURCE_REPO_RELATIONSHIPS = | ||
'build-cloud-function-source-repo-relationships'; | ||
|
||
export const FunctionStepsSpec = { | ||
FETCH_CLOUD_FUNCTIONS: { | ||
id: 'fetch-cloud-functions', | ||
name: 'Cloud Functions', | ||
}, | ||
CLOUD_FUNCTIONS_SERVICE_ACCOUNT_RELATIONSHIPS: { | ||
id: 'build-cloud-function-service-account-relationships', | ||
name: 'Cloud Function Service Account Relationships', | ||
}, | ||
CLOUD_FUNCTIONS_SOURCE_REPO_RELATIONSHIP: { | ||
id: 'build-cloud-function-source-repo-relationships', | ||
name: 'Build Cloud Function -> Source Repository Relationships', | ||
}, | ||
}; | ||
|
||
export const FunctionEntitiesSpec = { | ||
CLOUD_FUNCTION: { | ||
resourceName: 'Cloud Function', | ||
_type: 'google_cloud_function', | ||
_class: ['Function'], | ||
}, | ||
}; | ||
|
||
export const RELATIONSHIP_TYPE_CLOUD_FUNCTION_USES_IAM_SERVICE_ACCOUNT = | ||
'google_cloud_function_uses_iam_service_account'; | ||
export const FunctionsRelationshipsSpec = { | ||
GOOGLE_CLOUD_FUNCTION_USES_IAM_SERVICE_ACCOUNT: { | ||
_class: RelationshipClass.USES, | ||
_type: 'google_cloud_function_uses_iam_service_account', | ||
sourceType: 'google_cloud_function', | ||
targetType: IAM_SERVICE_ACCOUNT_ENTITY_TYPE, | ||
}, | ||
GOOGLE_CLOUD_FUNCTION_USES_SOURCE_REPOSITORY: { | ||
_type: 'google_cloud_function_uses_source_repository', | ||
_class: RelationshipClass.USES, | ||
sourceType: 'google_cloud_function', | ||
targetType: 'google_cloud_source_repository', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters