Skip to content

Commit

Permalink
migrate
Browse files Browse the repository at this point in the history
Signed-off-by: Francis <colifran@amazon.com>
  • Loading branch information
colifran committed Dec 8, 2023
1 parent ca3be84 commit 721c59f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 2 additions & 6 deletions packages/aws-cdk-lib/aws-iam/lib/oidc-provider.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import * as path from 'path';
import { Construct } from 'constructs';
import {
Arn,
CustomResource,
CustomResourceProvider,
CustomResourceProviderRuntime,
IResource,
Resource,
Token,
} from '../../core';
import { OidcProvider } from '../../custom-resource-handlers/dist/aws-iam/oidc-provider.generated';

const RESOURCE_TYPE = 'Custom::AWSCDKOpenIdConnectProvider';

Expand Down Expand Up @@ -162,9 +160,7 @@ export class OpenIdConnectProvider extends Resource implements IOpenIdConnectPro
}

private getOrCreateProvider() {
return CustomResourceProvider.getOrCreateProvider(this, RESOURCE_TYPE, {
codeDirectory: path.join(__dirname, '..', '..', 'custom-resource-handlers', 'dist', 'aws-iam', 'oidc-handler'),
runtime: CustomResourceProviderRuntime.NODEJS_18_X,
return OidcProvider.getOrCreateProvider(this, RESOURCE_TYPE, {
policyStatements: [
{
Effect: 'Allow',
Expand Down
8 changes: 6 additions & 2 deletions packages/aws-cdk-lib/core/lib/private/cfn-utils-provider.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
import * as path from 'path';
import { Construct } from 'constructs';
import { CfnUtilsResourceType } from './cfn-utils-provider/consts';
import { CdkCfnUtilsProvider } from '../../../custom-resource-handlers/dist/core/cfn-utils-provider.generated';
import { CustomResource } from '../custom-resource';
import { CustomResourceProvider, CustomResourceProviderRuntime } from '../custom-resource-provider';

/**
* A custom resource provider for CFN utilities such as `CfnJson`.
*/
export class CfnUtilsProvider extends Construct {
public static getOrCreate(scope: Construct) {
return CdkCfnUtilsProvider.getOrCreate(scope, 'AWSCDKCfnUtilsProvider', {});
return CustomResourceProvider.getOrCreate(scope, 'AWSCDKCfnUtilsProvider', {
runtime: CustomResourceProviderRuntime.NODEJS_18_X,
codeDirectory: path.join(__dirname, '..', '..', '..', 'custom-resource-handlers', 'dist', 'core', 'cfn-utils-provider'),
});
}
}

Expand Down

0 comments on commit 721c59f

Please sign in to comment.