@cloudcomponents/cdk-container-registry
TypeScript icon, indicating that this package has built-in type declarations

2.3.0 • Public • Published

cloudcomponents Logo

@cloudcomponents/cdk-container-registry

Build Status cdkdx typescript python

Registry for container images

Install

TypeScript/JavaScript:

npm i @cloudcomponents/cdk-container-registry

Python:

pip install cloudcomponents.cdk-container-registry

How to use

import { ImageRepository, Severity } from '@cloudcomponents/cdk-container-registry';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import { Construct } from 'constructs';

export class ImageRepositoryStack extends Stack {
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);

    const alarmTopic = new Topic(this, 'Topic');

    alarmTopic.addSubscription(
      new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL as string),
    );

    const imageRepository = new ImageRepository(this, 'ImageRepository', {
      forceDelete: true, //Only for tests
      imageScanOnPush: true,
    });

    imageRepository.onFinding('finding', {
      severity: Severity.HIGH,
      alarmTopic,
    });
  }
}

API Reference

See API.md.

Example

See more complete examples.

License

MIT

Package Sidebar

Install

npm i @cloudcomponents/cdk-container-registry

Weekly Downloads

422

Version

2.3.0

License

MIT

Unpacked Size

11.7 MB

Total Files

12

Last publish

Collaborators

  • hupe1980