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

Commit

Permalink
Refactor to use getEffectivePolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
eXtremeX committed Feb 28, 2022
1 parent 71a031d commit 3e34096
Show file tree
Hide file tree
Showing 34 changed files with 3,659 additions and 14,022 deletions.
2 changes: 0 additions & 2 deletions src/getStepStartStates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ import {
import { STEP_BILLING_ACCOUNTS } from './steps/cloud-billing/constants';
import { isMasterOrganizationInstance } from './utils/isMasterOrganizationInstance';
import { isSingleProjectInstance } from './utils/isSingleProjectInstance';
import { STEP_ORGANIZATION_POLICIES } from './steps/orgpolicy/constants';

function validateInvocationConfig(
context: IntegrationExecutionContext<SerializedIntegrationConfig>,
Expand Down Expand Up @@ -305,7 +304,6 @@ export default async function getStepStartStates(
// This API will be enabled otherwise fetching services names above would fail
[STEP_RESOURCE_MANAGER_PROJECT]: { disabled: false },
[STEP_API_SERVICES]: { disabled: false },
[STEP_ORGANIZATION_POLICIES]: { disabled: false },
[STEP_IAM_BINDINGS]: createStartStatesBasedOnServiceAccountProject(
ServiceUsageName.CLOUD_ASSET,
ServiceUsageName.IAM,
Expand Down
4 changes: 0 additions & 4 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ import {
STEP_BUILD_PROJECT_BUDGET,
} from './steps/billing-budgets/constants';
import { STEP_BILLING_ACCOUNTS } from './steps/cloud-billing/constants';
import { STEP_ORGANIZATION_POLICIES } from './steps/orgpolicy/constants';

interface ValidateInvocationInvalidConfigTestParams {
instanceConfig?: Partial<IntegrationConfig>;
Expand Down Expand Up @@ -413,9 +412,6 @@ describe('#getStepStartStates success', () => {
[STEP_RESOURCE_MANAGER_FOLDERS]: {
disabled: false,
},
[STEP_ORGANIZATION_POLICIES]: {
disabled: false,
},
[STEP_RESOURCE_MANAGER_ORG_PROJECT_RELATIONSHIPS]: {
disabled: false,
},
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import { Client } from './google-cloud/client';
import { cloudAssetSteps } from './steps/cloud-asset';
import { bigTableSteps } from './steps/big-table';
import { maybeDefaultProjectIdOnEntity } from './utils/maybeDefaultProjectIdOnEntity';
import { orgPolicySteps } from './steps/orgpolicy';

export const invocationConfig: IntegrationInvocationConfig<IntegrationConfig> =
{
Expand Down Expand Up @@ -86,7 +85,6 @@ export const invocationConfig: IntegrationInvocationConfig<IntegrationConfig> =
...bigTableSteps,
...billingBudgetsSteps,
...cloudBillingSteps,
...orgPolicySteps,
],
dependencyGraphOrder: ['last'],
beforeAddEntity: maybeDefaultProjectIdOnEntity,
Expand Down
Loading

0 comments on commit 3e34096

Please sign in to comment.