Skip to content

Commit

Permalink
Merge branch 'main' into neptune-metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 22, 2022
2 parents bf1a6a1 + 4ad4567 commit 137a60d
Show file tree
Hide file tree
Showing 219 changed files with 1,013 additions and 410 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-merit-badger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
thresholds: '[0,3,6,13,25,50]'
badge-type: 'achievement'
ignore-usernames: '[RomainMuller,rix0rrr,Jerry-AWS,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,ryparker,TheRealAmazonKendra,vinayak-kukreja,Naumel,mrgrain]'
ignore-usernames: '[RomainMuller,rix0rrr,Jerry-AWS,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,corymhall,peterwoodworth,ryparker,TheRealAmazonKendra,vinayak-kukreja,Naumel,mrgrain,aws-cdk-automation,dependabot,mergify]'
8 changes: 8 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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.43.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.42.1-alpha.0...v2.43.0-alpha.0) (2022-09-21)


### Bug Fixes

* **integ-tests:** AwsApiCall Custom Resource length could be greater than 60 characters ([#22119](https://github.com/aws/aws-cdk/issues/22119)) ([35b2806](https://github.com/aws/aws-cdk/commit/35b280616a420987b6553f73bc91a736b06d4e1a))
* **integ-tests:** can't enable lookups when creating an IntegTest ([#22075](https://github.com/aws/aws-cdk/issues/22075)) ([d0e0ab9](https://github.com/aws/aws-cdk/commit/d0e0ab9d3744372edd56aa984daac4de26272673))

## [2.42.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.42.0-alpha.0...v2.42.1-alpha.0) (2022-09-19)

## [2.42.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.41.0-alpha.0...v2.42.0-alpha.0) (2022-09-15)
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@

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.43.0](https://github.com/aws/aws-cdk/compare/v2.42.1...v2.43.0) (2022-09-21)


### Features

* **cfnspec:** cloudformation spec v89.0.0 ([#22105](https://github.com/aws/aws-cdk/issues/22105)) ([9726e8f](https://github.com/aws/aws-cdk/commit/9726e8fa07bcf496c79f8ab3be1c9f04b0e5dc3a))
* **ec2:** flowlog setting add MaxAggregationInterval ([#22098](https://github.com/aws/aws-cdk/issues/22098)) ([dbede40](https://github.com/aws/aws-cdk/commit/dbede408ee21e2e62137867a7fd040890daf77c7))
* **stepfunctions-tasks:** additional IAM statements for AWS SDK service integration ([#22070](https://github.com/aws/aws-cdk/issues/22070)) ([fbb941f](https://github.com/aws/aws-cdk/commit/fbb941f848fc363c93ae79d899532ed4522f31b1)), closes [#22006](https://github.com/aws/aws-cdk/issues/22006)


### Bug Fixes

* **api-gateway:** SpecRestApi ignores disableExecuteApiEndpoint property ([#22133](https://github.com/aws/aws-cdk/issues/22133)) ([a4364ce](https://github.com/aws/aws-cdk/commit/a4364ceb9a5303768c5c1447857af44f1fe9e8ce)), closes [#21295](https://github.com/aws/aws-cdk/issues/21295)
* **certificatemanager:** unable to set removal policy on DnsValidatedCertificate ([#22040](https://github.com/aws/aws-cdk/issues/22040)) ([b3c9464](https://github.com/aws/aws-cdk/commit/b3c9464d0e0d333db132daec96cdd283145a6ce5)), closes [#20649](https://github.com/aws/aws-cdk/issues/20649)
* **cli:** "EACCES: Permission denied" on 'cdk init' ([#22111](https://github.com/aws/aws-cdk/issues/22111)) ([384ba2b](https://github.com/aws/aws-cdk/commit/384ba2b7fc2ae9c5a70d0e5633fcc463b2cea282)), closes [#21049](https://github.com/aws/aws-cdk/issues/21049) [#22090](https://github.com/aws/aws-cdk/issues/22090)
* **cli:** Lambda hotswap fails if environment contains tokens ([#22099](https://github.com/aws/aws-cdk/issues/22099)) ([8280709](https://github.com/aws/aws-cdk/commit/8280709219d95ac4bd76e21bfe8214a02afaa413)), closes [#22088](https://github.com/aws/aws-cdk/issues/22088)
* **codedeploy:** unable to configure disable automatically rollback ([#22083](https://github.com/aws/aws-cdk/issues/22083)) ([ce27789](https://github.com/aws/aws-cdk/commit/ce277899e9df2ae9d69e94bdaa931e130cd4c95a)), closes [#21691](https://github.com/aws/aws-cdk/issues/21691)
* **s3-deployment:** fails when `destinationKeyPrefix` is a token with a long string representation ([#22163](https://github.com/aws/aws-cdk/issues/22163)) ([ce59b6a](https://github.com/aws/aws-cdk/commit/ce59b6aaa7a19ec074547824c3641822ab853213))


## [2.42.1](https://github.com/aws/aws-cdk/compare/v2.42.0...v2.42.1) (2022-09-19)


Expand Down
62 changes: 61 additions & 1 deletion packages/@aws-cdk/aws-ec2/lib/vpn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { IVpc, SubnetSelection } from './vpc';
export interface IVpnConnection extends IResource {
/**
* The id of the VPN connection.
* @attribute VpnConnectionId
*/
readonly vpnId: string;

Expand Down Expand Up @@ -177,12 +178,71 @@ export class VpnGateway extends Resource implements IVpnGateway {
this.gatewayId = vpnGW.ref;
}
}

/**
* Attributes of an imported VpnConnection.
*/
export interface VpnConnectionAttributes {

/**
* The id of the VPN connection.
*/
readonly vpnId: string;

/**
* The id of the customer gateway.
*/
readonly customerGatewayId: string;

/**
* The ip address of the customer gateway.
*/
readonly customerGatewayIp: string;

/**
* The ASN of the customer gateway.
*/
readonly customerGatewayAsn: number;

}

/**
* Base class for Vpn connections.
*/
export abstract class VpnConnectionBase extends Resource implements IVpnConnection {

public abstract readonly vpnId: string;
public abstract readonly customerGatewayId: string;
public abstract readonly customerGatewayIp: string;
public abstract readonly customerGatewayAsn: number;

}

/**
* Define a VPN Connection
*
* @resource AWS::EC2::VPNConnection
*/
export class VpnConnection extends Resource implements IVpnConnection {
export class VpnConnection extends VpnConnectionBase {

/**
* Import a VPN connection by supplying all attributes directly
*/
public static fromVpnConnectionAttributes(scope: Construct, id: string, attrs: VpnConnectionAttributes): IVpnConnection {

class Import extends VpnConnectionBase {

public readonly vpnId: string = attrs.vpnId;
public readonly customerGatewayId: string = attrs.customerGatewayId;
public readonly customerGatewayIp: string = attrs.customerGatewayIp;
public readonly customerGatewayAsn: number = attrs.customerGatewayAsn;

}

return new Import(scope, id);

}

/**
* Return the given named metric for all VPN connections in the account/region.
*/
Expand Down
42 changes: 42 additions & 0 deletions packages/@aws-cdk/aws-ec2/test/vpn.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,48 @@ describe('vpn', () => {

});

test('can import a vpn connection from attributes', () => {

const stack = new Stack();

const vpn = VpnConnection.fromVpnConnectionAttributes(stack, 'Connection', {
vpnId: 'idv',
customerGatewayIp: 'ip',
customerGatewayId: 'idc',
customerGatewayAsn: 6500,
});

expect(vpn.vpnId).toEqual('idv');
expect(vpn.customerGatewayAsn).toEqual(6500);
expect(vpn.customerGatewayId).toEqual('idc');
expect(vpn.customerGatewayIp).toEqual('ip');

expect(stack.resolve(vpn.metricTunnelState())).toEqual({
dimensions: { VpnId: 'idv' },
namespace: 'AWS/VPN',
metricName: 'TunnelState',
period: Duration.minutes(5),
statistic: 'Average',
});

expect(stack.resolve(vpn.metricTunnelDataIn())).toEqual({
dimensions: { VpnId: 'idv' },
namespace: 'AWS/VPN',
metricName: 'TunnelDataIn',
period: Duration.minutes(5),
statistic: 'Sum',
});

expect(stack.resolve(vpn.metricTunnelDataOut())).toEqual({
dimensions: { VpnId: 'idv' },
namespace: 'AWS/VPN',
metricName: 'TunnelDataOut',
period: Duration.minutes(5),
statistic: 'Sum',
});

});

test('can use metricAllTunnelDataOut', () => {
// GIVEN
const stack = new Stack();
Expand Down
60 changes: 60 additions & 0 deletions packages/@aws-cdk/cfnspec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,63 @@
# CloudFormation Resource Specification v89.0.0

## New Resource Types


## Attribute Changes

* AWS::EC2::VPNConnection Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html
* AWS::EC2::VPNConnection VpnConnectionId (__added__)

## Property Changes

* AWS::EC2::VPNConnection CustomerGatewayId.Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html#cfn-ec2-vpnconnection-customergatewayid
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html#cfn-ec2-vpnconnection-customergatewayid
* AWS::EC2::VPNConnection StaticRoutesOnly.Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html#cfn-ec2-vpnconnection-StaticRoutesOnly
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html#cfn-ec2-vpnconnection-staticroutesonly
* AWS::EC2::VPNConnection Tags.Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html#cfn-ec2-vpnconnection-tags
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html#cfn-ec2-vpnconnection-tags
* AWS::EC2::VPNConnection TransitGatewayId.Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html#cfn-ec2-vpnconnection-transitgatewayid
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html#cfn-ec2-vpnconnection-transitgatewayid
* AWS::EC2::VPNConnection Type.Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html#cfn-ec2-vpnconnection-type
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html#cfn-ec2-vpnconnection-type
* AWS::EC2::VPNConnection VpnGatewayId.Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html#cfn-ec2-vpnconnection-vpngatewayid
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html#cfn-ec2-vpnconnection-vpngatewayid
* AWS::EC2::VPNConnection VpnTunnelOptionsSpecifications.Documentation (__changed__)
* Old: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpn-connection.html#cfn-ec2-vpnconnection-vpntunneloptionsspecifications
* New: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-vpnconnection.html#cfn-ec2-vpnconnection-vpntunneloptionsspecifications
* AWS::EC2::VPNConnection VpnTunnelOptionsSpecifications.DuplicatesAllowed (__changed__)
* Old: false
* New: true
* AWS::Evidently::Project AppConfigResource (__added__)
* AWS::IoT::CACertificate RemoveAutoRegistration (__added__)
* AWS::Logs::Destination DestinationPolicy.Required (__changed__)
* Old: true
* New: false
* AWS::RDS::DBInstance CustomIAMInstanceProfile (__added__)
* AWS::RDS::DBInstance NcharCharacterSetName (__added__)
* AWS::Redshift::ClusterParameterGroup Parameters.DuplicatesAllowed (__deleted__)
* AWS::Redshift::ClusterParameterGroup Tags.DuplicatesAllowed (__deleted__)

## Property Type Changes

* AWS::Evidently::Project.AppConfigResourceObject (__added__)
* AWS::MediaPackage::OriginEndpoint.CmafEncryption EncryptionMethod (__added__)

## Unapplied changes

* AWS::ConnectCampaigns is at 0.0.0
* AWS::Rekognition is at 68.0.0
* AWS::RolesAnywhere is at 0.0.0
* AWS::SageMaker is at 72.0.0

# CloudFormation Resource Specification v88.0.0

## New Resource Types
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cfnspec/cfn.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
88.0.0
89.0.0
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"options": {
"classFile": "vpn",
"class": "VpnConnection",
"class": "VpnConnectionBase",
"interface": "IVpnConnection"
},
"metrics": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
}
},
"ResourceSpecificationVersion": "88.0.0",
"ResourceSpecificationVersion": "89.0.0",
"ResourceTypes": {
"AWS::ConnectCampaigns::Campaign": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
}
}
},
"ResourceSpecificationVersion": "88.0.0",
"ResourceSpecificationVersion": "89.0.0",
"ResourceTypes": {
"AWS::Rekognition::Collection": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rolesanywhere-trustanchor-sourcedata.html"
}
},
"ResourceSpecificationVersion": "88.0.0",
"ResourceSpecificationVersion": "89.0.0",
"ResourceTypes": {
"AWS::RolesAnywhere::CRL": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3531,7 +3531,7 @@
}
}
},
"ResourceSpecificationVersion": "88.0.0",
"ResourceSpecificationVersion": "89.0.0",
"ResourceTypes": {
"AWS::SageMaker::App": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::ACMPCA::Certificate.ApiPassthrough": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-apipassthrough.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::APS::Workspace.LoggingConfiguration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-aps-workspace-loggingconfiguration.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AccessAnalyzer::Analyzer.ArchiveRule": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-archiverule.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AmazonMQ::Broker.ConfigurationId": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-configurationid.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::Amplify::App.AutoBranchCreationConfig": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AmplifyUIBuilder::Component.ActionParameters": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-actionparameters.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::ApiGateway::ApiKey.StageKey": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::ApiGatewayV2::Api.BodyS3Location": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AppConfig::Application.Tags": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-application-tags.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AppFlow::ConnectorProfile.AmplitudeConnectorProfileCredentials": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-amplitudeconnectorprofilecredentials.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AppIntegrations::DataIntegration.ScheduleConfig": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-dataintegration-scheduleconfig.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AppMesh::GatewayRoute.GatewayRouteHostnameMatch": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-gatewayroutehostnamematch.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AppRunner::ObservabilityConfiguration.TraceConfiguration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-observabilityconfiguration-traceconfiguration.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AppStream::AppBlock.S3Location": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-appblock-s3location.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "88.0.0",
"$version": "89.0.0",
"PropertyTypes": {
"AWS::AppSync::DataSource.AuthorizationConfig": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html",
Expand Down
Loading

0 comments on commit 137a60d

Please sign in to comment.