Skip to main content

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

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


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

File details

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

File metadata

File hashes

Hashes for gammarers_aws_codeconnections_host_custom_resource-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1eae2109f6426d46c39f3c2481b0f78a377bb3553ee7492565692990de90313e
MD5 6406dce913a602c17fcd149d9d0e79f8
BLAKE2b-256 8c23cb70fe9c53ecf91cf95836802bde57b7ed2cec7d239794700a0659995a03

See more details on using hashes here.

File details

Details for the file gammarers.aws_codeconnections_host_custom_resource-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gammarers.aws_codeconnections_host_custom_resource-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f40d9eae8c4a0bfe85a99ccbbae915dbfd7140c971b7dfa07c617b75c1026583
MD5 a976d9fd7af3de0da2b628eabfa95725
BLAKE2b-256 76024254450d0e54478137ea1ee754b83586fcf37307a9af8b204707ce0e1961

See more details on using hashes here.

Supported by

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