Skip to content

Commit

Permalink
feat: add ECR repository for Form images
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneRifle committed Aug 13, 2024
1 parent 260114d commit f7622cd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/constructs/ecr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Construct } from 'constructs'
import * as ecrdeploy from 'cdk-ecr-deployment'
import { Repository } from 'aws-cdk-lib/aws-ecr'
import * as ecr from 'aws-cdk-lib/aws-ecr-assets'
import { RemovalPolicy } from 'aws-cdk-lib'

export interface FormsgEcrProps {
}
Expand All @@ -10,21 +11,34 @@ export class FormsgEcr extends Construct {
readonly lambdaVirusScanner: {
repository: Repository
}
readonly form: {
repository: Repository
}

constructor(
scope: Construct,
props: FormsgEcrProps = {}
) {
super(scope, 'ecr')
const repository = new Repository(this, 'lambda-virus-scanner', {
const repositoryLambdaVirusScanner = new Repository(this, 'lambda-virus-scanner', {
repositoryName: 'lambda-virus-scanner',
removalPolicy: RemovalPolicy.DESTROY,
})
// new ecrdeploy.ECRDeployment(scope, 'ecr-deployment-lambda-virus-scanner', {
// src: new ecrdeploy.DockerImageName('opengovsg/lambda-virus-scanner:latest'),
// dest: new ecrdeploy.DockerImageName(this.lambdaVirusScanner.repositoryUriForTag('latest')),
// })
this.lambdaVirusScanner = {
repository,
repository: repositoryLambdaVirusScanner,
}


const repositoryForm = new Repository(this, 'form', {
repositoryName: 'form',
removalPolicy: RemovalPolicy.DESTROY,
})
this.form = {
repository: repositoryForm,
}
}

Expand Down

0 comments on commit f7622cd

Please sign in to comment.