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
| testfargateLBPublicListenerECSGroup81318DEB: | |
| Type: AWS::ElasticLoadBalancingV2::TargetGroup | |
| Properties: | |
| HealthCheckPath: /actuator/health | |
| Port: 80 | |
| Protocol: HTTP | |
| TargetType: ip | |
| VpcId: | |
| Ref: EcsDefaultClusterMnL3mNNYNVpc7788A521 | |
| Metadata: |
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
| testfargateLBPublicListenerECSGroup81318DEB: | |
| Type: AWS::ElasticLoadBalancingV2::TargetGroup | |
| Properties: | |
| Port: 80 | |
| Protocol: HTTP | |
| TargetType: ip | |
| VpcId: | |
| Ref: EcsDefaultClusterMnL3mNNYNVpc7788A521 | |
| Metadata: | |
| aws:cdk:path: CdktestsStack/test-fargate/LB/PublicListener/ECSGroup/Resource |
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
| const albfs = new ApplicationLoadBalancedFargateService(this, 'test-fargate', { | |
| taskImageOptions: { | |
| image: ecs.ContainerImage.fromEcrRepository(repository, 'latest') | |
| } | |
| }) | |
| albfs.targetGroup.configureHealthCheck({ | |
| path: '/actuator/health', | |
| }); |
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
| test('ELB health check path is using Spring Boot endpoint', () => { | |
| const app = new cdk.App(); | |
| const stack = new Cdktests.CdktestsStack(app, 'MyTestStack'); | |
| expectCDK(stack).to(haveResource("AWS::ElasticLoadBalancingV2::TargetGroup",{ | |
| HealthCheckPath: '/actuator/health' | |
| })); | |
| }); |
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', { |
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
| test('Fargate is using the latest image in ECR', () => { | |
| const app = new cdk.App(); | |
| const stack = new Cdktests.CdktestsStack(app, 'MyTestStack'); | |
| expectCDK(stack).to(haveResourceLike("AWS::ECS::TaskDefinition",{ | |
| ContainerDefinitions: [{ | |
| Image: { | |
| "Fn::Join": [ | |
| "", |
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
| test('Fargate service is using the default values', () => { | |
| const app = new cdk.App(); | |
| const stack = new Cdktests.CdktestsStack(app, 'MyTestStack'); | |
| expectCDK(stack).to(haveResource("AWS::ECS::Service",{ | |
| LaunchType: 'FARGATE', | |
| DesiredCount: 1, | |
| HealthCheckGracePeriodSeconds: 60 | |
| })); |
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 { expect as expectCDK, haveResource } from '@aws-cdk/assert'; | |
| import * as cdk from '@aws-cdk/core'; | |
| import * as Cdktests from '../lib/cdktests-stack'; | |
| test('ECR Resource is present', () => { | |
| const app = new cdk.App(); | |
| const stack = new Cdktests.CdktestsStack(app, 'MyTestStack'); | |
| expectCDK(stack).to(haveResource("AWS::ECR::Repository",{ |
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
| Resources: | |
| testrepository3CFC24EC: | |
| Type: AWS::ECR::Repository | |
| Properties: | |
| RepositoryName: test | |
| UpdateReplacePolicy: Retain | |
| DeletionPolicy: Retain | |
| Metadata: | |
| aws:cdk:path: CdktestsStack/test-repository/Resource | |
| CDKMetadata: |
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'; | |
| export class CdktestsStack extends cdk.Stack { | |
| constructor(scope: cdk.Construct, id: string, props?: cdk.StackProps) { | |
| super(scope, id, props); | |
| new ecr.Repository(this, 'test-repository', { | |
| repositoryName: `test` | |
| }); |
NewerOlder