Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
46 changes: 43 additions & 3 deletions API.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ yarn add @gammarers/aws-codeconnections-host-custom-resource
## Example

```typescript
import { RDSDatabaseAutoRunningStopStack } from '@gammarers/aws-codeconnections-host-custom-resource';
import { RDSDatabaseAutoRunningStopStack, CodeConnectionsHostProviderType } from '@gammarers/aws-codeconnections-host-custom-resource';

const codeConnectionsHostCustomResource = new CodeConnectionsHostCustomResource(this, 'CodeConnectionsHost', {
name: 'gitlab.example.com', // required, connection host name (Minimum length of 1. Maximum length of 64.)
providerEndpoint: 'https://gitlab.example.com', // required, your provider endpoint (Minimum length of 1. Maximum length of 512.)
providerType: 'GitLabSelfManaged', // required, Bitbucket | GitHub | GitHubEnterpriseServer | GitLab | GitLabSelfManaged
providerType: CodeConnectionsHostProviderType.GIT_LAB_SELF_MANAGED,
});

// get host arn
Expand Down
11 changes: 10 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@ import * as iam from 'aws-cdk-lib/aws-iam';
import * as cr from 'aws-cdk-lib/custom-resources';
import { Construct } from 'constructs';

// Bitbucket | GitHub | GitHubEnterpriseServer | GitLab | GitLabSelfManaged
export enum CodeConnectionsHostProviderType {
BIT_BUCKET = 'Bitbucket',
GIT_HUB = 'GitHub',
GIT_HUB_ENTERPRISE_SERVER = 'GitHubEnterpriseServer',
GIT_LAB = 'GitLab',
GIT_LAB_SELF_MANAGED = 'GitLabSelfManaged',
}

export interface CodeConnectionsHostCustomResourceProps {
readonly name: string;
readonly providerEndpoint: string;
readonly providerType: string;
readonly providerType: CodeConnectionsHostProviderType;
}

export class CodeConnectionsHostCustomResource extends cr.AwsCustomResource {
Expand Down
133 changes: 133 additions & 0 deletions test/__snapshots__/custom-resource.bitbucket.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

133 changes: 133 additions & 0 deletions test/__snapshots__/custom-resource.github-enterprise.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading