Skip to content

Commit

Permalink
Merge branch 'main' into dzhuneyt/issue-10952-aws-batch-env-name
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 21, 2022
2 parents 0eab1f6 + f66f94e commit be06bff
Show file tree
Hide file tree
Showing 24 changed files with 753 additions and 76 deletions.
12 changes: 12 additions & 0 deletions packages/@aws-cdk/aws-ec2/lib/instance-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ export enum InstanceClass {
*/
R5 = 'r5',

/**
* Memory optimized instances based on AMD EPYC, 6th generation
*/
MEMORY6_AMD = 'memory6-amd',

/**
* Memory optimized instances based on AMD EPYC, 6th generation
*/
R6A = 'r6a',

/**
* Memory optimized instances, 6th generation with Intel Xeon Scalable processors (3rd generation processors code named Ice Lake)
*/
Expand Down Expand Up @@ -1046,6 +1056,8 @@ export class InstanceType {
[InstanceClass.R4]: 'r4',
[InstanceClass.MEMORY5]: 'r5',
[InstanceClass.R5]: 'r5',
[InstanceClass.MEMORY6_AMD]: 'r6a',
[InstanceClass.R6A]: 'r6a',
[InstanceClass.MEMORY6_INTEL]: 'r6i',
[InstanceClass.R6I]: 'r6i',
[InstanceClass.MEMORY6_INTEL_NVME_DRIVE]: 'r6id',
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/test/instance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ describe('instance', () => {
});
test('instance architecture is correctly discerned for x86-64 instance', () => {
// GIVEN
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i']; // A sample of x86-64 instance classes
const sampleInstanceClasses = ['c5', 'm5ad', 'r5n', 'm6', 't3a', 'r6i', 'r6a']; // A sample of x86-64 instance classes

for (const instanceClass of sampleInstanceClasses) {
// WHEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AutoScalingGroup } from '@aws-cdk/aws-autoscaling';
import { InstanceType, Vpc } from '@aws-cdk/aws-ec2';
import { Cluster, ContainerImage, AsgCapacityProvider, EcsOptimizedImage } from '@aws-cdk/aws-ecs';
import { App, Stack } from '@aws-cdk/core';

import * as integ from '@aws-cdk/integ-tests';
import { ApplicationLoadBalancedEc2Service } from '../../lib';

const app = new App();
Expand Down Expand Up @@ -49,4 +49,8 @@ new ApplicationLoadBalancedEc2Service(stack, 'myService', {
],
});

new integ.IntegTest(app, 'applicationLoadBalancedEc2ServiceTest', {
testCases: [stack],
});

app.synth();
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import { AutoScalingGroup } from '@aws-cdk/aws-autoscaling';
import { InstanceType, Vpc } from '@aws-cdk/aws-ec2';
import { Cluster, ContainerImage, AsgCapacityProvider, EcsOptimizedImage } from '@aws-cdk/aws-ecs';
import { App, Stack } from '@aws-cdk/core';

import * as integ from '@aws-cdk/integ-tests';
import { NetworkLoadBalancedEc2Service } from '../../lib';

const app = new App();
const stack = new Stack(app, 'aws-ecs-integ');
const vpc = new Vpc(stack, 'Vpc', { maxAzs: 2 });
const cluster = new Cluster(stack, 'Cluster', { vpc });
const provider1 = new AsgCapacityProvider(stack, 'FirstCapacityProvier', {

const provider1 = new AsgCapacityProvider(stack, 'FirstCapacityProvider', {
autoScalingGroup: new AutoScalingGroup(stack, 'FirstAutoScalingGroup', {
vpc,
instanceType: new InstanceType('t2.micro'),
Expand All @@ -18,7 +19,8 @@ const provider1 = new AsgCapacityProvider(stack, 'FirstCapacityProvier', {
capacityProviderName: 'first-capacity-provider',
});
cluster.addAsgCapacityProvider(provider1);
const provider2 = new AsgCapacityProvider(stack, 'SecondCapacityProvier', {

const provider2 = new AsgCapacityProvider(stack, 'SecondCapacityProvider', {
autoScalingGroup: new AutoScalingGroup(stack, 'SecondAutoScalingGroup', {
vpc,
instanceType: new InstanceType('t3.micro'),
Expand Down Expand Up @@ -49,4 +51,8 @@ new NetworkLoadBalancedEc2Service(stack, 'myService', {
],
});

new integ.IntegTest(app, 'networkLoadBalancedEc2ServiceTest', {
testCases: [stack],
});

app.synth();

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,10 @@
"Properties": {
"CapacityProviders": [
{
"Ref": "FirstCapacityProvierD92F5AC4"
"Ref": "FirstCapacityProvider4F40D887"
},
{
"Ref": "SecondCapacityProvierADE5DA56"
"Ref": "SecondCapacityProvider85378C3E"
}
],
"Cluster": {
Expand Down Expand Up @@ -595,7 +595,7 @@
}
}
},
"FirstCapacityProvierD92F5AC4": {
"FirstCapacityProvider4F40D887": {
"Type": "AWS::ECS::CapacityProvider",
"Properties": {
"AutoScalingGroupProvider": {
Expand Down Expand Up @@ -803,7 +803,7 @@
}
}
},
"SecondCapacityProvierADE5DA56": {
"SecondCapacityProvider85378C3E": {
"Type": "AWS::ECS::CapacityProvider",
"Properties": {
"AutoScalingGroupProvider": {
Expand Down Expand Up @@ -997,14 +997,14 @@
{
"Base": 1,
"CapacityProvider": {
"Ref": "FirstCapacityProvierD92F5AC4"
"Ref": "FirstCapacityProvider4F40D887"
},
"Weight": 1
},
{
"Base": 0,
"CapacityProvider": {
"Ref": "SecondCapacityProvierADE5DA56"
"Ref": "SecondCapacityProvider85378C3E"
},
"Weight": 2
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"version": "20.0.0",
"testCases": {
"ec2/integ.network-load-balanced-ecs-service": {
"networkLoadBalancedEc2ServiceTest/DefaultTest": {
"stacks": [
"aws-ecs-integ"
],
"diffAssets": false,
"stackUpdateWorkflow": true
"assertionStack": "networkLoadBalancedEc2ServiceTestDefaultTestDeployAssert34DAD7DE"
}
},
"synthContext": {},
"enableLookups": false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@
"data": "SsmParameterValueawsserviceecsoptimizedamiamazonlinux2recommendedimageidC96584B6F00A464EAD1953AFF4B05118Parameter"
}
],
"/aws-ecs-integ/FirstCapacityProvier/FirstCapacityProvier": [
"/aws-ecs-integ/FirstCapacityProvider/FirstCapacityProvider": [
{
"type": "aws:cdk:logicalId",
"data": "FirstCapacityProvierD92F5AC4"
"data": "FirstCapacityProvider4F40D887"
}
],
"/aws-ecs-integ/SecondAutoScalingGroup/InstanceSecurityGroup/Resource": [
Expand Down Expand Up @@ -249,37 +249,28 @@
"data": "SecondAutoScalingGroupASG6483DDB2"
}
],
"/aws-ecs-integ/SecondCapacityProvier/SecondCapacityProvier": [
"/aws-ecs-integ/SecondCapacityProvider/SecondCapacityProvider": [
{
"type": "aws:cdk:logicalId",
"data": "SecondCapacityProvierADE5DA56"
"data": "SecondCapacityProvider85378C3E"
}
],
"/aws-ecs-integ/myService/LB/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "myServiceLB168895E1",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_REPLACE"
]
"data": "myServiceLB168895E1"
}
],
"/aws-ecs-integ/myService/LB/PublicListener/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "myServiceLBPublicListenerC78AE8A0",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_REPLACE"
]
"data": "myServiceLBPublicListenerC78AE8A0"
}
],
"/aws-ecs-integ/myService/LB/PublicListener/ECSGroup/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "myServiceLBPublicListenerECSGroup17E9BBC1",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_REPLACE"
]
"data": "myServiceLBPublicListenerECSGroup17E9BBC1"
}
],
"/aws-ecs-integ/myService/LoadBalancerDNS": [
Expand Down Expand Up @@ -324,17 +315,35 @@
"data": "myServiceB0B6FAA0"
}
],
"myServiceLBSecurityGroupFE0ED608": [
"FirstCapacityProvierD92F5AC4": [
{
"type": "aws:cdk:logicalId",
"data": "myServiceLBSecurityGroupFE0ED608",
"data": "FirstCapacityProvierD92F5AC4",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
]
}
],
"SecondCapacityProvierADE5DA56": [
{
"type": "aws:cdk:logicalId",
"data": "SecondCapacityProvierADE5DA56",
"trace": [
"!!DESTRUCTIVE_CHANGES: WILL_DESTROY"
]
}
]
},
"displayName": "aws-ecs-integ"
},
"networkLoadBalancedEc2ServiceTestDefaultTestDeployAssert34DAD7DE": {
"type": "aws:cloudformation:stack",
"environment": "aws://unknown-account/unknown-region",
"properties": {
"templateFile": "networkLoadBalancedEc2ServiceTestDefaultTestDeployAssert34DAD7DE.template.json",
"validateOnSynth": false
},
"displayName": "networkLoadBalancedEc2ServiceTest/DefaultTest/DeployAssert"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.33"
"version": "10.1.49"
}
},
"aws-ecs-integ": {
Expand Down Expand Up @@ -683,10 +683,10 @@
"aws:cdk:cloudformation:props": {
"capacityProviders": [
{
"Ref": "FirstCapacityProvierD92F5AC4"
"Ref": "FirstCapacityProvider4F40D887"
},
{
"Ref": "SecondCapacityProvierADE5DA56"
"Ref": "SecondCapacityProvider85378C3E"
}
],
"cluster": {
Expand Down Expand Up @@ -993,13 +993,13 @@
"version": "0.0.0"
}
},
"FirstCapacityProvier": {
"id": "FirstCapacityProvier",
"path": "aws-ecs-integ/FirstCapacityProvier",
"FirstCapacityProvider": {
"id": "FirstCapacityProvider",
"path": "aws-ecs-integ/FirstCapacityProvider",
"children": {
"FirstCapacityProvier": {
"id": "FirstCapacityProvier",
"path": "aws-ecs-integ/FirstCapacityProvier/FirstCapacityProvier",
"FirstCapacityProvider": {
"id": "FirstCapacityProvider",
"path": "aws-ecs-integ/FirstCapacityProvider/FirstCapacityProvider",
"attributes": {
"aws:cdk:cloudformation:type": "AWS::ECS::CapacityProvider",
"aws:cdk:cloudformation:props": {
Expand Down Expand Up @@ -1298,13 +1298,13 @@
"version": "0.0.0"
}
},
"SecondCapacityProvier": {
"id": "SecondCapacityProvier",
"path": "aws-ecs-integ/SecondCapacityProvier",
"SecondCapacityProvider": {
"id": "SecondCapacityProvider",
"path": "aws-ecs-integ/SecondCapacityProvider",
"children": {
"SecondCapacityProvier": {
"id": "SecondCapacityProvier",
"path": "aws-ecs-integ/SecondCapacityProvier/SecondCapacityProvier",
"SecondCapacityProvider": {
"id": "SecondCapacityProvider",
"path": "aws-ecs-integ/SecondCapacityProvider/SecondCapacityProvider",
"attributes": {
"aws:cdk:cloudformation:type": "AWS::ECS::CapacityProvider",
"aws:cdk:cloudformation:props": {
Expand Down Expand Up @@ -1677,14 +1677,14 @@
"capacityProviderStrategy": [
{
"capacityProvider": {
"Ref": "FirstCapacityProvierD92F5AC4"
"Ref": "FirstCapacityProvider4F40D887"
},
"base": 1,
"weight": 1
},
{
"capacityProvider": {
"Ref": "SecondCapacityProvierADE5DA56"
"Ref": "SecondCapacityProvider85378C3E"
},
"base": 0,
"weight": 2
Expand Down Expand Up @@ -1736,6 +1736,42 @@
"fqn": "@aws-cdk/core.Stack",
"version": "0.0.0"
}
},
"networkLoadBalancedEc2ServiceTest": {
"id": "networkLoadBalancedEc2ServiceTest",
"path": "networkLoadBalancedEc2ServiceTest",
"children": {
"DefaultTest": {
"id": "DefaultTest",
"path": "networkLoadBalancedEc2ServiceTest/DefaultTest",
"children": {
"Default": {
"id": "Default",
"path": "networkLoadBalancedEc2ServiceTest/DefaultTest/Default",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.49"
}
},
"DeployAssert": {
"id": "DeployAssert",
"path": "networkLoadBalancedEc2ServiceTest/DefaultTest/DeployAssert",
"constructInfo": {
"fqn": "@aws-cdk/core.Stack",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "@aws-cdk/integ-tests.IntegTestCase",
"version": "0.0.0"
}
}
},
"constructInfo": {
"fqn": "@aws-cdk/integ-tests.IntegTest",
"version": "0.0.0"
}
}
},
"constructInfo": {
Expand Down
Loading

0 comments on commit be06bff

Please sign in to comment.