Created
February 23, 2021 16:22
-
-
Save axelhodler/4948573416264ee1919988712dadf382 to your computer and use it in GitHub Desktop.
Adding ApplicationLoadBalancedFargateService
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as cdk from '@aws-cdk/core'; | |
import * as ecr from '@aws-cdk/aws-ecr'; | |
import * as ecs from '@aws-cdk/aws-ecs'; | |
import {ApplicationLoadBalancedFargateService} from "@aws-cdk/aws-ecs-patterns"; | |
export class CdktestsStack extends cdk.Stack { | |
constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
super(scope, id, props); | |
const repository = new ecr.Repository(this, 'test-repository', { | |
repositoryName: `test` | |
}); | |
new ApplicationLoadBalancedFargateService(this, 'test-fargate', { | |
taskImageOptions: { | |
image: ecs.ContainerImage.fromEcrRepository(repository, 'latest') | |
} | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment