Skip to main content

This AWS CDK Construct provides a custom resource (Lambda Function) to create a connection host for Self-Managed GitLab, which is not yet supported by CloudFormation. Additionally, even after creating the Host and the connection, authentication must be done via a browser.

Project description

AWS CodeConnections Host Custom Resource

GitHub npm (scoped) GitHub Workflow Status (branch) GitHub release (latest SemVer)

View on Construct Hub

This AWS CDK Construct provides a custom resource (Lambda Function) to create a connection host for Self-Managed GitLab, which is not yet supported by CloudFormation. Additionally, even after creating the Host and the connection, authentication must be done via a browser.

Install

TypeScript

install by npm

npm install @gammarers/aws-codeconnections-host-custom-resource

install by yarn

yarn add @gammarers/aws-codeconnections-host-custom-resource

Python

install by pip

pip install gammarers.aws-budgets-notification

Example

import { CodeConnectionsHostCustomResource, 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: CodeConnectionsHostProviderType.GIT_LAB_SELF_MANAGED,
});

// get host arn
const hostArn = gitLabSelfManagedConnectionHostCustomResource.findHostArn();

new codeconnections.CfnConnection(this, 'Connection', {
  connectionName: 'example-gitlab-connection',
  hostArn,
});

How to complete (Update a pending connection)

Deploy completed after being configured in EXAMPLE. At this point, the status is ‘Pending’ as shown below because authentication has not yet been completed.

CodeConnection Setup 01

Select the ‘Connection’ you have created to display the Connection detail screen.

CodeConnection Setup 02

You will see the ‘Pending’ status as follows. Select ‘Update pending connection’.

CodeConnection Setup 03

A screen to enter the Provide personal access token (pat) will be displayed; the pat should be created in the target host environment (only api should be enabled). Enter the pat and select ‘Continue’.

CodeConnection Setup 04

The host authorisation screen will appear as shown below, select ‘Authorise’ (the screen will pop up).

If you have not logged in, a login screen will be displayed, please log in.

CodeConnection Setup 05

When completed, the status will change to ‘Available’ as follows. This completes all Connection settings.

License

This project is licensed under the Apache-2.0 License.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file gammarers_aws_codeconnections_host_custom_resource-0.6.4.tar.gz.

File metadata

File hashes

Hashes for gammarers_aws_codeconnections_host_custom_resource-0.6.4.tar.gz
Algorithm Hash digest
SHA256 4bc8999133f7d8c125f71b047ce3d56621512cb9c934fb6021114bb82e5515ad
MD5 efd9ead2177e8ba58386290372f7282a
BLAKE2b-256 1e5646e8ce73029d82a52fe0a35a8f8b8abfd77fe28be4aca21d86650a7a3b85

See more details on using hashes here.

File details

Details for the file gammarers_aws_codeconnections_host_custom_resource-0.6.4-py3-none-any.whl.

File metadata

File hashes

Hashes for gammarers_aws_codeconnections_host_custom_resource-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 003f3ceb33e657bce6113d95ac267b1e3666e28550158329ba03a537d5a07209
MD5 8b659e5a5bb486656fc6975f2d2c12e6
BLAKE2b-256 7b640e96e3999e71f2e373d8c21d34741a308be297133452a0c08ca4af6a2c8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page