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

Gcp enhancement milestone 02 #689

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4e79c7f
Cloud Monitoring: (feat): Initial commit
sarthak-metron Apr 24, 2024
ca72dd8
Partner Interconnect: (feat): initial commit
sarthak-metron Apr 25, 2024
307ab67
Partner Interconnect : (feat) : Added the fields and unit test
sarthak-metron Apr 25, 2024
32d40c1
Merge branch 'GCP-Enhancement-Milestone2-dev' into GCP-Enhancement-Mi…
sarthak-metron Apr 25, 2024
2b8e96f
MemoryStore : (feat) : Initial commit
sarthak-metron Apr 26, 2024
acf0646
MemoryStore : (feat) : Added relationship,unit test code
sarthak-metron Apr 26, 2024
e199673
Partner Interconnect : (feat) : Adding unit test code
sarthak-metron Apr 29, 2024
2829f6e
Partner Interconnect : (feat) : adding unit test
sarthak-metron Apr 29, 2024
a371e7c
unit test error fixed
Bharatkk-metron Apr 29, 2024
152b96b
Partner Interconnect : (feat) : updated the code
sarthak-metron Apr 30, 2024
68f269f
Merge branch 'GCP-Enhancement-Milestone2-dev' into GCP-Enhancement-Mi…
sarthak-metron Apr 30, 2024
2f47fde
missing import added
Bharatkk-metron May 6, 2024
076d473
Merge pull request #662 from JupiterOne/main
Bharatkk-metron May 7, 2024
a695965
Merge pull request #663 from JupiterOne/main
sarthak-metron May 7, 2024
57627b4
Partner Interconnect : (feat) : updated the code according to new upd…
sarthak-metron May 7, 2024
f90aaf8
MemoryStore : (feat) : updated the code according to new update in main
sarthak-metron May 7, 2024
2620c85
Merge pull request #664 from JupiterOne/main
sarthak-metron May 7, 2024
1045295
Cloud Monitoring : (feat) : updated the code according to new update …
sarthak-metron May 7, 2024
b35e253
Merge pull request #669 from JupiterOne/GCP-Enhancement-Milestone-04-…
sarthak-metron May 8, 2024
4e02f1b
Merge pull request #670 from JupiterOne/GCP-Enhancement-Milestone-04-…
sarthak-metron May 8, 2024
f74e596
Merge branch 'GCP-Enhancement-Milestone2-dev' into GCP-Enhancement-Mi…
sarthak-metron May 8, 2024
1e11a21
Merge pull request #673 from JupiterOne/GCP-Enhancement-Milestone-04-…
sarthak-metron May 8, 2024
9db910a
merging the network analyzer code in milestone2
sarthak-metron May 9, 2024
b057614
Merge pull request #682 from JupiterOne/GCP-Enhancement-Milestone-02-…
sarthak-metron May 9, 2024
829af19
added vpc connector entity step
Bharatkk-metron May 15, 2024
f8c8dc7
conn test uses vpc relationship added
Bharatkk-metron May 15, 2024
7184045
project uses vpc relationship
Bharatkk-metron May 15, 2024
5b54b9a
entity field added
Bharatkk-metron May 15, 2024
ecba8e8
added step ids
Bharatkk-metron May 15, 2024
508d471
corrected unit tests
Bharatkk-metron May 15, 2024
0a0e272
unit test added
Bharatkk-metron May 15, 2024
c90b721
relationships code added
Bharatkk-metron May 20, 2024
cb16141
summary property modifed
Bharatkk-metron May 20, 2024
36ab568
unused variable removed
Bharatkk-metron May 20, 2024
a712787
unused variable removed
Bharatkk-metron May 20, 2024
6eba9e4
constant file organise and removed unused variables
Bharatkk-metron May 20, 2024
f8a0e63
unit tests corrected
Bharatkk-metron May 20, 2024
ccd0b52
unit tests added
Bharatkk-metron May 21, 2024
7d0792d
yarn file modified
Bharatkk-metron May 21, 2024
099673e
Merge pull request #683 from JupiterOne/GCP-Enhancement-Milestone2-dev
Bharatkk-metron May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion docs/jupiterone.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
"document:permissions": " yarn ts-node commands/documentPermissions.ts documentPermissions"
},
"peerDependencies": {
"@jupiterone/integration-sdk-core": "^11.0.3"
"@jupiterone/integration-sdk-core": "^12.7.1"
},
"devDependencies": {
"@jupiterone/integration-sdk-core": "^11.0.3",
"@jupiterone/integration-sdk-dev-tools": "^11.0.3",
"@jupiterone/integration-sdk-testing": "^11.0.3",
"@jupiterone/integration-sdk-core": "^12.7.1",
"@jupiterone/integration-sdk-dev-tools": "^12.7.1",
"@jupiterone/integration-sdk-testing": "^12.7.1",
"@types/bunyan": "^1.8.6",
"@types/bunyan-format": "^0.2.3",
"@types/node-fetch": "^2.5.10",
Expand Down
63 changes: 29 additions & 34 deletions src/__recordings__/getStepStartStates_2244155193/recording.har

Large diffs are not rendered by default.

221 changes: 220 additions & 1 deletion src/getStepStartStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import { cloudSourceRepositoriesSteps } from './steps/cloud-source-repositories'
import { CloudSourceRepositoriesStepsSpec } from './steps/cloud-source-repositories/constants';
import {
computeSteps,
STEP_CLOUD_INTERCONNECT,
STEP_COMPUTE_ADDRESSES,
STEP_COMPUTE_BACKEND_BUCKETS,
STEP_COMPUTE_BACKEND_SERVICES,
Expand All @@ -95,6 +96,8 @@ import {
STEP_COMPUTE_NETWORK_PEERING_RELATIONSHIPS,
STEP_COMPUTE_NETWORKS,
STEP_COMPUTE_PROJECT,
STEP_COMPUTE_PROJECT_HAS_CLOUD_INTERCONNECT_RELATIONSHIP,
STEP_COMPUTE_PROJECT_HAS_INTERCONNECT_LOCATION_RELATIONSHIP,
STEP_COMPUTE_REGION_BACKEND_SERVICES,
STEP_COMPUTE_REGION_DISKS,
STEP_COMPUTE_REGION_HEALTH_CHECKS,
Expand All @@ -110,6 +113,8 @@ import {
STEP_COMPUTE_TARGET_HTTPS_PROXIES,
STEP_COMPUTE_TARGET_SSL_PROXIES,
STEP_CREATE_COMPUTE_BACKEND_BUCKET_BUCKET_RELATIONSHIPS,
STEP_INTERCONNECT_LOCATION,
STEP_INTERCONNECT_LOCATION_USES_CLOUD_INTERCONNECT_RELATIONSHIP,
} from './steps/compute';
import { containerSteps, STEP_CONTAINER_CLUSTERS } from './steps/containers';
import { dataprocSteps } from './steps/dataproc';
Expand Down Expand Up @@ -156,7 +161,16 @@ import {
STEP_MEMCACHE_INSTANCES,
} from './steps/memcache/constants';
import { monitoringSteps } from './steps/monitoring';
import { STEP_MONITORING_ALERT_POLICIES } from './steps/monitoring/constants';
import {
STEP_CLOUD_MONITORING,
STEP_CLOUD_MONITORING_HAS_MONITORING_ALERT_POLICIES_RELATIONSHIP,
STEP_CLOUD_MONITORING_HAS_MONITORING_CHANNELS_RELATIONSHIP,
STEP_CLOUD_MONITORING_HAS_MONITORING_GROUPS_RELATIONSHIP,
STEP_MONITORING_ALERT_POLICIES,
STEP_MONITORING_CHANNELS,
STEP_MONITORING_GROUPS,
STEP_PROJECT_HAS_CLOUD_MONITORING_RELATIONSHIP,
} from './steps/monitoring/constants';
import { privateCaSteps } from './steps/privateca';
import { PrivatecaSteps } from './steps/privateca/constants';
import { pubSubSteps } from './steps/pub-sub';
Expand All @@ -168,6 +182,12 @@ import {
import { redisSteps } from './steps/redis';
import {
STEP_CREATE_REDIS_INSTANCE_NETWORK_RELATIONSHIPS,
STEP_MEMORYSTORE_REDIS,
STEP_MEMORYSTORE_REDIS_LOCATION,
STEP_MEMORYSTORE_REDIS_LOCATION_HAS_REDIS_INSTANCE_RELATIONSHIP,
STEP_PROJECT_HAS_MEMORYSTORE_REDIS_LOCATION_RELTIONSHIP,
STEP_PROJECT_HAS_MEMORYSTORE_REDIS_RELATIONSHIP,
STEP_PROJECT_HAS_REDIS_INSTANCE_RELATIONSHIP,
STEP_REDIS_INSTANCES,
} from './steps/redis/constants';
import {
Expand Down Expand Up @@ -201,6 +221,26 @@ import { WebSecurityScannerSteps } from './steps/web-security-scanner/constants'
import { IntegrationConfig } from './types';
import { isMasterOrganizationInstance } from './utils/isMasterOrganizationInstance';
import { isSingleProjectInstance } from './utils/isSingleProjectInstance';
import {
STEP_CONNECTIVITY_TEST_USES_VPC_RELATIONSHIP,
STEP_NETWORK_ANALYZER_CONNECTIVITY_TEST,
STEP_NETWORK_ANALYZER_VPC,
STEP_NETWORK_INTELLIGENCE_CENTER,
STEP_NETWORK_INTELLIGENCE_CENTER_HAS_NETWORK_ANALYZER_CONNECTIVITY_TEST_RELATIONSHIP,
STEP_PROJECT_HAS_NETWORK_ANALYZER_CONNECTIVITY_TEST_RELATIONSHIP,
STEP_PROJECT_HAS_NETWORK_INTELLIGENCE_CENTER_RELATIONSHIP,
STEP_PROJECT_USES_NETWORK_ANALYZER_VPC_RELATIONSHIP,
STEP_VPN_GATEWAY,
STEP_VPN_GATEWAY_TUNNEL,
STEP_VPN_GATEWAY_USES_VPN_GATEWAY_TUNNEL_RELATIONSHIP,
STEP_CONNECTIVITY_TEST_SCANS_COMPUTE_INSTANCE,
STEP_CONNECTIVITY_TEST_SCANS_FORWARDING_RULE,
STEP_CONNECTIVITY_TEST_SCANS_CLOUD_SQL_INSTANCE,
STEP_CONNECTIVITY_TEST_SCANS_CLOUD_FUNCTION,
STEP_CONNECTIVITY_TEST_SCANS_APP_ENGINE_VERSION,
STEP_CONNECTIVITY_TEST_SCANS_NETWORK,
} from './steps/network-analyzer/constants';
import { networkAnalyzerSteps } from './steps/network-analyzer';

function makeStepStartStates(
stepIds: string[],
Expand Down Expand Up @@ -371,6 +411,17 @@ function getDefaultStepStartStates(params: {
[STEP_COMPUTE_TARGET_HTTP_PROXIES]: { disabled: false },
[STEP_COMPUTE_REGION_TARGET_HTTP_PROXIES]: { disabled: false },
[STEP_COMPUTE_SSL_POLICIES]: { disabled: false },
[STEP_CLOUD_INTERCONNECT]: { disabled: false },
[STEP_INTERCONNECT_LOCATION]: { disabled: false },
[STEP_INTERCONNECT_LOCATION_USES_CLOUD_INTERCONNECT_RELATIONSHIP]: {
disabled: false,
},
[STEP_COMPUTE_PROJECT_HAS_CLOUD_INTERCONNECT_RELATIONSHIP]: {
disabled: false,
},
[STEP_COMPUTE_PROJECT_HAS_INTERCONNECT_LOCATION_RELATIONSHIP]: {
disabled: false,
},
[STEP_CLOUD_KMS_KEY_RINGS]: { disabled: false },
[STEP_CLOUD_KMS_KEYS]: { disabled: false },
[STEP_BIG_QUERY_DATASETS]: { disabled: false },
Expand All @@ -390,6 +441,19 @@ function getDefaultStepStartStates(params: {
},
[STEP_LOGGING_METRICS]: { disabled: false },
[STEP_MONITORING_ALERT_POLICIES]: { disabled: false },
[STEP_MONITORING_GROUPS]: { disabled: false },
[STEP_MONITORING_CHANNELS]: { disabled: false },
[STEP_CLOUD_MONITORING]: { disabled: false },
[STEP_PROJECT_HAS_CLOUD_MONITORING_RELATIONSHIP]: { disabled: false },
[STEP_CLOUD_MONITORING_HAS_MONITORING_GROUPS_RELATIONSHIP]: {
disabled: false,
},
[STEP_CLOUD_MONITORING_HAS_MONITORING_CHANNELS_RELATIONSHIP]: {
disabled: false,
},
[STEP_CLOUD_MONITORING_HAS_MONITORING_ALERT_POLICIES_RELATIONSHIP]: {
disabled: false,
},
[STEP_BINARY_AUTHORIZATION_POLICY]: { disabled: false },
[STEP_PUBSUB_TOPICS]: { disabled: false },
[STEP_CREATE_PUBSUB_TOPIC_KMS_RELATIONSHIPS]: { disabled: false },
Expand All @@ -402,7 +466,19 @@ function getDefaultStepStartStates(params: {
[STEP_CLOUD_RUN_ROUTES]: { disabled: false },
[STEP_CLOUD_RUN_CONFIGURATIONS]: { disabled: false },
[STEP_REDIS_INSTANCES]: { disabled: false },
[STEP_MEMORYSTORE_REDIS_LOCATION]: { disabled: false },
[STEP_MEMORYSTORE_REDIS]: { disabled: false },
[STEP_CREATE_REDIS_INSTANCE_NETWORK_RELATIONSHIPS]: { disabled: false },
[STEP_PROJECT_HAS_MEMORYSTORE_REDIS_RELATIONSHIP]: { disabled: false },
[STEP_PROJECT_HAS_MEMORYSTORE_REDIS_LOCATION_RELTIONSHIP]: {
disabled: false,
},
[STEP_PROJECT_HAS_REDIS_INSTANCE_RELATIONSHIP]: {
disabled: false,
},
[STEP_MEMORYSTORE_REDIS_LOCATION_HAS_REDIS_INSTANCE_RELATIONSHIP]: {
disabled: false,
},
[STEP_MEMCACHE_INSTANCES]: { disabled: false },
[STEP_CREATE_MEMCACHE_INSTANCE_NETWORK_RELATIONSHIPS]: { disabled: false },
[STEP_SPANNER_INSTANCES]: { disabled: false },
Expand Down Expand Up @@ -481,6 +557,58 @@ function getDefaultStepStartStates(params: {
[WebSecurityScannerSteps.FETCH_SCAN_RUNS.id]: {
disabled: false,
},
[STEP_NETWORK_INTELLIGENCE_CENTER]: {
disabled: false,
},
[STEP_NETWORK_ANALYZER_CONNECTIVITY_TEST]: {
disabled: false,
},
[STEP_VPN_GATEWAY]: {
disabled: false,
},
[STEP_VPN_GATEWAY_TUNNEL]: {
disabled: false,
},
[STEP_NETWORK_INTELLIGENCE_CENTER_HAS_NETWORK_ANALYZER_CONNECTIVITY_TEST_RELATIONSHIP]:
{
disabled: false,
},
[STEP_VPN_GATEWAY_USES_VPN_GATEWAY_TUNNEL_RELATIONSHIP]: {
disabled: false,
},
[STEP_PROJECT_HAS_NETWORK_ANALYZER_CONNECTIVITY_TEST_RELATIONSHIP]: {
disabled: false,
},
[STEP_PROJECT_HAS_NETWORK_INTELLIGENCE_CENTER_RELATIONSHIP]: {
disabled: false,
},
[STEP_NETWORK_ANALYZER_VPC]: {
disabled: false,
},
[STEP_CONNECTIVITY_TEST_USES_VPC_RELATIONSHIP]: {
disabled: false,
},
[STEP_PROJECT_USES_NETWORK_ANALYZER_VPC_RELATIONSHIP]: {
disabled: false,
},
[STEP_CONNECTIVITY_TEST_SCANS_COMPUTE_INSTANCE]: {
disabled: false,
},
[STEP_CONNECTIVITY_TEST_SCANS_FORWARDING_RULE]: {
disabled: false,
},
[STEP_CONNECTIVITY_TEST_SCANS_CLOUD_SQL_INSTANCE]: {
disabled: false,
},
[STEP_CONNECTIVITY_TEST_SCANS_CLOUD_FUNCTION]: {
disabled: false,
},
[STEP_CONNECTIVITY_TEST_SCANS_APP_ENGINE_VERSION]: {
disabled: false,
},
[STEP_CONNECTIVITY_TEST_SCANS_NETWORK]: {
disabled: false,
},
};

logger.info(
Expand Down Expand Up @@ -733,6 +861,18 @@ async function getStepStartStatesUsingServiceEnablements(params: {
ServiceUsageName.COMPUTE,
),
[STEP_COMPUTE_SSL_POLICIES]: createStepStartState(ServiceUsageName.COMPUTE),
[STEP_CLOUD_INTERCONNECT]: createOrgStepStartState(
ServiceUsageName.COMPUTE,
),
[STEP_INTERCONNECT_LOCATION]: createOrgStepStartState(
ServiceUsageName.COMPUTE,
),
[STEP_INTERCONNECT_LOCATION_USES_CLOUD_INTERCONNECT_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.COMPUTE),
[STEP_COMPUTE_PROJECT_HAS_CLOUD_INTERCONNECT_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.COMPUTE),
[STEP_COMPUTE_PROJECT_HAS_INTERCONNECT_LOCATION_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.COMPUTE),
[STEP_CLOUD_KMS_KEY_RINGS]: createStepStartState(ServiceUsageName.KMS),
[STEP_CLOUD_KMS_KEYS]: createStepStartState(ServiceUsageName.KMS),
[STEP_BIG_QUERY_DATASETS]: createStepStartState(ServiceUsageName.BIG_QUERY),
Expand All @@ -758,6 +898,24 @@ async function getStepStartStatesUsingServiceEnablements(params: {
[STEP_MONITORING_ALERT_POLICIES]: createStepStartState(
ServiceUsageName.MONITORING,
),
[STEP_CLOUD_MONITORING]: createOrgStepStartState(
ServiceUsageName.MONITORING,
),
[STEP_MONITORING_CHANNELS]: createOrgStepStartState(
ServiceUsageName.MONITORING,
),
[STEP_MONITORING_GROUPS]: createOrgStepStartState(
ServiceUsageName.MONITORING,
),
[STEP_PROJECT_HAS_CLOUD_MONITORING_RELATIONSHIP]: createOrgStepStartState(
ServiceUsageName.MONITORING,
),
[STEP_CLOUD_MONITORING_HAS_MONITORING_GROUPS_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.MONITORING),
[STEP_CLOUD_MONITORING_HAS_MONITORING_CHANNELS_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.MONITORING),
[STEP_CLOUD_MONITORING_HAS_MONITORING_ALERT_POLICIES_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.MONITORING),
[STEP_BINARY_AUTHORIZATION_POLICY]: createStepStartState(
ServiceUsageName.BINARY_AUTHORIZATION,
),
Expand Down Expand Up @@ -787,9 +945,23 @@ async function getStepStartStatesUsingServiceEnablements(params: {
ServiceUsageName.CLOUD_RUN,
),
[STEP_REDIS_INSTANCES]: createStepStartState(ServiceUsageName.REDIS),
[STEP_MEMORYSTORE_REDIS_LOCATION]: createOrgStepStartState(
ServiceUsageName.REDIS,
),
[STEP_MEMORYSTORE_REDIS]: createOrgStepStartState(ServiceUsageName.REDIS),
[STEP_CREATE_REDIS_INSTANCE_NETWORK_RELATIONSHIPS]: createStepStartState(
ServiceUsageName.REDIS,
),
[STEP_PROJECT_HAS_MEMORYSTORE_REDIS_RELATIONSHIP]: createOrgStepStartState(
ServiceUsageName.REDIS,
),
[STEP_PROJECT_HAS_MEMORYSTORE_REDIS_LOCATION_RELTIONSHIP]:
createOrgStepStartState(ServiceUsageName.REDIS),
[STEP_PROJECT_HAS_REDIS_INSTANCE_RELATIONSHIP]: createOrgStepStartState(
ServiceUsageName.REDIS,
),
[STEP_MEMORYSTORE_REDIS_LOCATION_HAS_REDIS_INSTANCE_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.REDIS),
[STEP_MEMCACHE_INSTANCES]: createStepStartState(ServiceUsageName.MEMCACHE),
[STEP_CREATE_MEMCACHE_INSTANCE_NETWORK_RELATIONSHIPS]: createStepStartState(
ServiceUsageName.MEMCACHE,
Expand Down Expand Up @@ -904,6 +1076,52 @@ async function getStepStartStatesUsingServiceEnablements(params: {
[WebSecurityScannerSteps.FETCH_SCAN_RUNS.id]: createStepStartState(
ServiceUsageName.WEB_SECURITY_SCANNER,
),
[STEP_NETWORK_INTELLIGENCE_CENTER]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_NETWORK_ANALYZER_CONNECTIVITY_TEST]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_VPN_GATEWAY]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_VPN_GATEWAY_TUNNEL]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_PROJECT_HAS_NETWORK_INTELLIGENCE_CENTER_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.NETWORK_ANALYZER),
[STEP_PROJECT_HAS_NETWORK_ANALYZER_CONNECTIVITY_TEST_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.NETWORK_ANALYZER),
[STEP_NETWORK_INTELLIGENCE_CENTER_HAS_NETWORK_ANALYZER_CONNECTIVITY_TEST_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.NETWORK_ANALYZER),
[STEP_VPN_GATEWAY_USES_VPN_GATEWAY_TUNNEL_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.NETWORK_ANALYZER),
[STEP_NETWORK_ANALYZER_VPC]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_CONNECTIVITY_TEST_USES_VPC_RELATIONSHIP]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_PROJECT_USES_NETWORK_ANALYZER_VPC_RELATIONSHIP]:
createOrgStepStartState(ServiceUsageName.NETWORK_ANALYZER),
[STEP_CONNECTIVITY_TEST_SCANS_COMPUTE_INSTANCE]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_CONNECTIVITY_TEST_SCANS_FORWARDING_RULE]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_CONNECTIVITY_TEST_SCANS_CLOUD_SQL_INSTANCE]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_CONNECTIVITY_TEST_SCANS_CLOUD_FUNCTION]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_CONNECTIVITY_TEST_SCANS_APP_ENGINE_VERSION]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
[STEP_CONNECTIVITY_TEST_SCANS_NETWORK]: createOrgStepStartState(
ServiceUsageName.NETWORK_ANALYZER,
),
};

const apiServiceToStepIdsMap: { [apiService: string]: string[] } = {
Expand Down Expand Up @@ -946,6 +1164,7 @@ async function getStepStartStatesUsingServiceEnablements(params: {
[ServiceUsageName.WEB_SECURITY_SCANNER]: webSecurityScannerSteps.map(
(s) => s.id,
),
[ServiceUsageName.NETWORK_ANALYZER]: networkAnalyzerSteps.map((s) => s.id),
};

for (const serviceName of Object.keys(apiServiceToStepIdsMap)) {
Expand Down
1 change: 1 addition & 0 deletions src/google-cloud/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ export enum ServiceUsageName {
CLOUD_SOURCE_REPOSITORIES = 'sourcerepo.googleapis.com',
WEB_SECURITY_SCANNER = 'websecurityscanner.googleapis.com',
ORG_POLICY = 'orgpolicy.googleapis.com',
NETWORK_ANALYZER = 'networkmanagement.googleapis.com',
}
2 changes: 1 addition & 1 deletion src/google-cloud/utils/createErrorProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function createErrorProps(error: Error | GaxiosError): J1ApiErrorProps {
if (isGaxiosError(error) && error.response) {
return {
cause: redactBearerTokens(error),
endpoint: error.response?.config?.url || UNKNOWN_VALUE,
endpoint: (error.response?.config?.url as string) || UNKNOWN_VALUE,
status: error.response?.status,
statusText: error.message,
};
Expand Down
Loading
Loading