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

2.4.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

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @cloudcomponents/cdk-container-registry

    Weekly Downloads

    170

    Version

    2.4.0

    License

    MIT

    Unpacked Size

    1.2 MB

    Total Files

    12

    Last publish

    Collaborators

    • hupe1980