Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

Commit 0caa9dc

Browse files
Gaston YelminiGaston Yelmini
Gaston Yelmini
authored and
Gaston Yelmini
committed
feat(INT-5917): add cloud function storage bucket relationship
1 parent eb34b57 commit 0caa9dc

File tree

7 files changed

+832
-1
lines changed

7 files changed

+832
-1
lines changed

docs/jupiterone.md

+1
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ The following relationships are created:
460460
| `google_cloud_folder` | **HAS** | `google_cloud_folder` |
461461
| `google_cloud_function` | **USES** | `google_iam_service_account` |
462462
| `google_cloud_function` | **USES** | `google_cloud_source_repository` |
463+
| `google_cloud_function` | **USES** | `google_storage_bucket` |
463464
| `google_cloud_organization` | **HAS** | `google_cloud_folder` |
464465
| `google_cloud_project` | **HAS** | `google_cloud_api_service` |
465466
| `google_cloud_project` | **HAS** | `google_billing_budget` |

docs/spec/src/steps/services/functions/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ export const functionSteps: StepSpec<IntegrationInstanceConfig>[] = [
6262
},
6363
],
6464
dependsOn: ['fetch-cloud-functions', 'fetch-cloud-storage-buckets'],
65-
implemented: false,
65+
implemented: true,
6666
},
6767
{
6868
/**

src/getStepStartStates.ts

+5
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ import {
113113
STEP_CLOUD_FUNCTIONS,
114114
STEP_CLOUD_FUNCTIONS_SERVICE_ACCOUNT_RELATIONSHIPS,
115115
STEP_CLOUD_FUNCTIONS_SOURCE_REPO_RELATIONSHIPS,
116+
STEP_CLOUD_FUNCTIONS_STORAGE_BUCKET_RELATIONSHIPS,
116117
} from './steps/functions';
117118
import {
118119
STEP_IAM_CUSTOM_ROLES,
@@ -303,6 +304,7 @@ function getDefaultStepStartStates(params: {
303304
[STEP_CLOUD_FUNCTIONS]: { disabled: false },
304305
[STEP_CLOUD_FUNCTIONS_SERVICE_ACCOUNT_RELATIONSHIPS]: { disabled: false },
305306
[STEP_CLOUD_FUNCTIONS_SOURCE_REPO_RELATIONSHIPS]: { disabled: false },
307+
[STEP_CLOUD_FUNCTIONS_STORAGE_BUCKET_RELATIONSHIPS]: { disabled: false },
306308
[STEP_CLOUD_STORAGE_BUCKETS]: { disabled: false },
307309
[STEP_IAM_CUSTOM_ROLES]: { disabled: false },
308310
[STEP_IAM_CUSTOM_ROLE_SERVICE_API_RELATIONSHIPS]: { disabled: false },
@@ -596,6 +598,9 @@ async function getStepStartStatesUsingServiceEnablements(params: {
596598
[STEP_CLOUD_FUNCTIONS_SOURCE_REPO_RELATIONSHIPS]: createStepStartState(
597599
ServiceUsageName.CLOUD_FUNCTIONS,
598600
),
601+
[STEP_CLOUD_FUNCTIONS_STORAGE_BUCKET_RELATIONSHIPS]: createStepStartState(
602+
ServiceUsageName.CLOUD_FUNCTIONS,
603+
),
599604
[STEP_CLOUD_STORAGE_BUCKETS]: createStepStartState(
600605
ServiceUsageName.STORAGE,
601606
ServiceUsageName.STORAGE_COMPONENT,

0 commit comments

Comments
 (0)