Skip to content

Commit

Permalink
Merge branch 'main' into bump-cfnspec-main/v93.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Oct 20, 2022
2 parents 63786ea + 7b0bba0 commit 9483b33
Show file tree
Hide file tree
Showing 118 changed files with 2,223 additions and 347 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.47.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.46.0-alpha.0...v2.47.0-alpha.0) (2022-10-20)


### Features

* **redshift:** support enhanced vpc routing when creating redshift cluster ([#22499](https://github.com/aws/aws-cdk/issues/22499)) ([e2b18e7](https://github.com/aws/aws-cdk/commit/e2b18e7b47eb7a87ae37356a9719c055e58e6e6c))


### Bug Fixes

* **integ-runner:** Fix call to spawnSync for hooks commands ([#22429](https://github.com/aws/aws-cdk/issues/22429)) ([9139ca9](https://github.com/aws/aws-cdk/commit/9139ca96ffc010e13393aff927d7b7eacfbae4f9)), closes [#22344](https://github.com/aws/aws-cdk/issues/22344)
* **lambda-python:** root-owned cache items not cleaned up after install ([#22512](https://github.com/aws/aws-cdk/issues/22512)) ([5ef65e0](https://github.com/aws/aws-cdk/commit/5ef65e042c747bedf9d770b47e540393454762f2)), closes [#22398](https://github.com/aws/aws-cdk/issues/22398)

## [2.46.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.45.0-alpha.0...v2.46.0-alpha.0) (2022-10-13)


Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.47.0](https://github.com/aws/aws-cdk/compare/v2.46.0...v2.47.0) (2022-10-20)


### Features

* **apigateway:** support multi-level paths for custom domains ([#22463](https://github.com/aws/aws-cdk/issues/22463)) ([cdc5753](https://github.com/aws/aws-cdk/commit/cdc5753982d8f674dab2362ea63790abb736fa32)), closes [#15904](https://github.com/aws/aws-cdk/issues/15904)
* **config:** add custom policy rule constructs ([#21794](https://github.com/aws/aws-cdk/issues/21794)) ([09a5cc4](https://github.com/aws/aws-cdk/commit/09a5cc4ff55cb7d001c14059c12ada0a2801acd4)), closes [#21441](https://github.com/aws/aws-cdk/issues/21441)
* **elbv2:** add dropInvalidHeaderFields for elbv2 ([#22466](https://github.com/aws/aws-cdk/issues/22466)) ([91767f0](https://github.com/aws/aws-cdk/commit/91767f03e76db8a63c18882b44854999b15aaff4)), closes [/docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html#fsbp-elb-4](https://github.com/aws//docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html/issues/fsbp-elb-4)


### Bug Fixes

* breaking change to deployment config props ([#22567](https://github.com/aws/aws-cdk/issues/22567)) ([be6074a](https://github.com/aws/aws-cdk/commit/be6074a67b68ec2f295196ad73ddb6e92984bdf3)), closes [#22566](https://github.com/aws/aws-cdk/issues/22566)
* **apigateway:** validation for path parts does not allow creation of resources with colon ([#22531](https://github.com/aws/aws-cdk/issues/22531)) ([73c443a](https://github.com/aws/aws-cdk/commit/73c443a7cd14ad27776907095bf19100e903093f)), closes [#22477](https://github.com/aws/aws-cdk/issues/22477) [#22477](https://github.com/aws/aws-cdk/issues/22477)
* **cli:** hotswap deploy fails on multiple CfnEvaluationException ([#22339](https://github.com/aws/aws-cdk/issues/22339)) ([7b47f41](https://github.com/aws/aws-cdk/commit/7b47f4178e4a4b9fe3dcb54daa3ec9f94fbd2a31)), closes [#22323](https://github.com/aws/aws-cdk/issues/22323)
* **cloudwatch:** remove region from dashboard ARN ([#22524](https://github.com/aws/aws-cdk/issues/22524)) ([558d192](https://github.com/aws/aws-cdk/commit/558d1925d7c3b01d7681e28f7b85bc851e403556))
* **codeguruprofiler:** incorrect profiling group name is returned when using importing ([#22554](https://github.com/aws/aws-cdk/issues/22554)) ([9934619](https://github.com/aws/aws-cdk/commit/9934619970dcb582106e9b2bf0d373d730de1fee))
* **cognito:** cannot use same lambda function as trigger in multiple user pools ([#22444](https://github.com/aws/aws-cdk/issues/22444)) ([b26fc00](https://github.com/aws/aws-cdk/commit/b26fc007465ce9466cecfaf5c0bb337d741c77e8)), closes [#22315](https://github.com/aws/aws-cdk/issues/22315)
* **config:** Creating multiple rules from the same lambda ([#21594](https://github.com/aws/aws-cdk/issues/21594)) ([0d2b529](https://github.com/aws/aws-cdk/commit/0d2b5291a10a318bed8d77166eae2bd317dee62e)), closes [#17582](https://github.com/aws/aws-cdk/issues/17582)
* **iam:** missing validation for actions added post instantiation of a policy statement ([#21906](https://github.com/aws/aws-cdk/issues/21906)) ([10974d9](https://github.com/aws/aws-cdk/commit/10974d95693dd75e993b8f0b5808b775b55b3afd)), closes [40aws-cdk/aws-iam/lib/policy-statement.ts#L88-L95](https://github.com/40aws-cdk/aws-iam/lib/policy-statement.ts/issues/L88-L95)
* **stepfunctions:** JsonPath.listAt does not accept strings starting with `$[` ([#22472](https://github.com/aws/aws-cdk/issues/22472)) ([6f332ef](https://github.com/aws/aws-cdk/commit/6f332efb1ae5c22f1c3b02221362018e3f4b575f)), closes [#22471](https://github.com/aws/aws-cdk/issues/22471)

## [2.46.0](https://github.com/aws/aws-cdk/compare/v2.45.0...v2.46.0) (2022-10-13)


Expand Down
13 changes: 0 additions & 13 deletions packages/@aws-cdk/aws-codedeploy/lib/base-deployment-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,6 @@ export abstract class BaseDeploymentConfig extends Resource implements IBaseDepl
};
}

/**
* This method should be used only for static references to predefined deployment configurations,
* like EcsDeploymentConfig.ALL_AT_ONCE
* @param name the name of the referenced custom Deployment Configuration
* @returns a reference to an existing custom Deployment Configuration
*/
protected static deploymentConfig(name: string): IBaseDeploymentConfig {
return {
deploymentConfigName: name,
deploymentConfigArn: arnForDeploymentConfig(name),
};
}

/**
* The name of the deployment config
* @attribute
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-codedeploy/lib/ecs/deployment-config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Construct } from 'constructs';
import { BaseDeploymentConfig, BaseDeploymentConfigOptions, ComputePlatform, IBaseDeploymentConfig } from '../base-deployment-config';
import { TrafficRouting } from '../traffic-routing-config';
import { deploymentConfig } from '../utils';

/**
* The Deployment Configuration of an ECS Deployment Group.
Expand Down Expand Up @@ -59,6 +60,10 @@ export class EcsDeploymentConfig extends BaseDeploymentConfig implements IEcsDep
return this.fromDeploymentConfigName(scope, id, ecsDeploymentConfigName);
}

private static deploymentConfig(name: string): IEcsDeploymentConfig {
return deploymentConfig(name);
}

public constructor(scope: Construct, id: string, props?: EcsDeploymentConfigProps) {
super(scope, id, {
...props,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Construct } from 'constructs';
import { BaseDeploymentConfig, BaseDeploymentConfigOptions, ComputePlatform, IBaseDeploymentConfig } from '../base-deployment-config';
import { TrafficRouting } from '../traffic-routing-config';
import { deploymentConfig } from '../utils';

/**
* The Deployment Configuration of a Lambda Deployment Group.
Expand Down Expand Up @@ -92,6 +93,10 @@ export class LambdaDeploymentConfig extends BaseDeploymentConfig implements ILam
return this.fromLambdaDeploymentConfigName(_scope, _id, props.deploymentConfigName);
}

private static deploymentConfig(name: string): ILambdaDeploymentConfig {
return deploymentConfig(name);
}

public constructor(scope: Construct, id: string, props?: LambdaDeploymentConfigProps) {
super(scope, id, {
...props,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Construct } from 'constructs';
import { BaseDeploymentConfig, BaseDeploymentConfigOptions, IBaseDeploymentConfig } from '../base-deployment-config';
import { MinimumHealthyHosts } from '../host-health-config';
import { deploymentConfig } from '../utils';

/**
* The Deployment Configuration of an EC2/on-premise Deployment Group.
Expand Down Expand Up @@ -63,6 +64,10 @@ export class ServerDeploymentConfig extends BaseDeploymentConfig implements ISer
return this.fromDeploymentConfigName(scope, id, serverDeploymentConfigName);
}

private static deploymentConfig(name: string): IServerDeploymentConfig {
return deploymentConfig(name);
}

constructor(scope: Construct, id: string, props: ServerDeploymentConfigProps) {
super(scope, id, props);
}
Expand Down
8 changes: 8 additions & 0 deletions packages/@aws-cdk/aws-codedeploy/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
import { Aws, Token } from '@aws-cdk/core';
import { IBaseDeploymentConfig } from './base-deployment-config';
import { CfnDeploymentGroup } from './codedeploy.generated';
import { AutoRollbackConfig } from './rollback-config';

Expand All @@ -26,6 +27,13 @@ CfnDeploymentGroup.AlarmConfigurationProperty | undefined {
};
}

export function deploymentConfig(name: string): IBaseDeploymentConfig {
return {
deploymentConfigName: name,
deploymentConfigArn: arnForDeploymentConfig(name),
};
}

enum AutoRollbackEvent {
DEPLOYMENT_FAILURE = 'DEPLOYMENT_FAILURE',
DEPLOYMENT_STOP_ON_ALARM = 'DEPLOYMENT_STOP_ON_ALARM',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class ProfilingGroup extends ProfilingGroupBase {
*/
public static fromProfilingGroupArn(scope: Construct, id: string, profilingGroupArn: string): IProfilingGroup {
class Import extends ProfilingGroupBase {
public readonly profilingGroupName = Stack.of(scope).splitArn(profilingGroupArn, ArnFormat.SLASH_RESOURCE_NAME).resource;
public readonly profilingGroupName = Stack.of(scope).splitArn(profilingGroupArn, ArnFormat.SLASH_RESOURCE_NAME).resourceName!;
public readonly profilingGroupArn = profilingGroupArn;
}

Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-codeguruprofiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"@aws-cdk/assertions": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "0.0.0",
"@aws-cdk/integ-tests": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^27.5.2"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { AccountRootPrincipal, Role } from '@aws-cdk/aws-iam';
import { App, CfnOutput, Stack } from '@aws-cdk/core';
import { ExpectedResult, IntegTest } from '@aws-cdk/integ-tests';
import { ProfilingGroup } from '../lib';

const app = new App();

const stack = new Stack(app, 'ProfilingGroupTestStack');

const profilingGroup1 = new ProfilingGroup(stack, 'ProfilingGroupWithExplicitlySetName', {
profilingGroupName: 'ExplicitlySetName',
});
const profilingGroup2 = new ProfilingGroup(stack, 'ProfilingGroupWithImplicitlySetName');

const publishAppRole = new Role(stack, 'PublishAppRole', {
assumedBy: new AccountRootPrincipal(),
});
profilingGroup1.grantPublish(publishAppRole);
profilingGroup2.grantPublish(publishAppRole);

const importedGroupWithExplicitlySetName = ProfilingGroup.fromProfilingGroupName(
stack,
'ImportedProfilingGroupWithExplicitlySetName',
profilingGroup1.profilingGroupName,
);

const importedGroupWithImplicitlySetName = ProfilingGroup.fromProfilingGroupName(
stack,
'ImportedProfilingGroupWithImplicitlySetName',
profilingGroup2.profilingGroupName,
);

new CfnOutput(stack, 'ExplicitlySetProfilingGroupName', {
value: importedGroupWithExplicitlySetName.profilingGroupName,
});

new CfnOutput(stack, 'ImplicitlySetProfilingGroupName', {
value: importedGroupWithImplicitlySetName.profilingGroupName,
});

const testCase = new IntegTest(app, 'test', {
testCases: [stack],
});

const describe = testCase.assertions.awsApiCall('CloudFormation', 'describeStacks', {
StackName: 'ProfilingGroupTestStack',
});

describe.assertAtPath('Stacks.0.Outputs.0.OutputKey', ExpectedResult.stringLikeRegexp('ExplicitlySetProfilingGroupName'));
describe.assertAtPath('Stacks.0.Outputs.0.OutputValue', ExpectedResult.stringLikeRegexp('ExplicitlySetName'));

describe.assertAtPath('Stacks.0.Outputs.1.OutputKey', ExpectedResult.stringLikeRegexp('ImplicitlySetProfilingGroupName'));
describe.assertAtPath('Stacks.0.Outputs.1.OutputValue', ExpectedResult.stringLikeRegexp('ProfilingGroupTestStackProfilingGroupWithImplicitlySetName98463923'));

app.synth();
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "21.0.0",
"files": {
"49d6a3151509f39124c2f82b21cf55a8a1364289fce8b6f8b764af6e204c6647": {
"source": {
"path": "ProfilingGroupTestStack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "49d6a3151509f39124c2f82b21cf55a8a1364289fce8b6f8b764af6e204c6647.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
{
"Resources": {
"ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE": {
"Type": "AWS::CodeGuruProfiler::ProfilingGroup",
"Properties": {
"ProfilingGroupName": "ExplicitlySetName"
}
},
"ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC": {
"Type": "AWS::CodeGuruProfiler::ProfilingGroup",
"Properties": {
"ProfilingGroupName": "ProfilingGroupTestStackProfilingGroupWithImplicitlySetName98463923"
}
},
"PublishAppRole9FEBD682": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"AWS": {
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":iam::",
{
"Ref": "AWS::AccountId"
},
":root"
]
]
}
}
}
],
"Version": "2012-10-17"
}
}
},
"PublishAppRoleDefaultPolicyCA1E15C3": {
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyDocument": {
"Statement": [
{
"Action": [
"codeguru-profiler:ConfigureAgent",
"codeguru-profiler:PostAgentProfile"
],
"Effect": "Allow",
"Resource": [
{
"Fn::GetAtt": [
"ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE",
"Arn"
]
},
{
"Fn::GetAtt": [
"ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC",
"Arn"
]
}
]
}
],
"Version": "2012-10-17"
},
"PolicyName": "PublishAppRoleDefaultPolicyCA1E15C3",
"Roles": [
{
"Ref": "PublishAppRole9FEBD682"
}
]
}
}
},
"Outputs": {
"ExplicitlySetProfilingGroupName": {
"Value": {
"Ref": "ProfilingGroupWithExplicitlySetNameProfilingGroup20552EAE"
}
},
"ImplicitlySetProfilingGroupName": {
"Value": {
"Ref": "ProfilingGroupWithImplicitlySetNameProfilingGroup21CDF1FC"
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Loading

0 comments on commit 9483b33

Please sign in to comment.