From ec4184933f98f07437deb13f2387563ab9d43d5c Mon Sep 17 00:00:00 2001 From: Noah Litov Date: Fri, 3 Jan 2020 17:55:18 -0800 Subject: [PATCH] fix: update CDK versions for Java examples to latest (#217) Updated all Java examples to the latest CDK version. We switched to use a version range in `pom.xml`, so we will now always use the latest versions as they are available. Also fixed the expected CFN output for the ECS examples tests (the updated CDK versions brought with them more taggable resources in the CFN spec). Fixes #216 --- java/custom-resource/pom.xml | 6 +++--- java/ecs/fargate-load-balanced-service/pom.xml | 6 +++--- .../com/amazonaws/cdk/examples/expected.cfn.json | 16 ++++++++++++++-- java/hello-world/pom.xml | 14 +++++++------- java/lambda-cron/pom.xml | 6 +++--- java/my-widget-service/pom.xml | 8 ++++---- java/package.json | 2 +- java/resource-overrides/pom.xml | 8 ++++---- .../examples/testResourceOverrides.expected.json | 8 +++++++- java/static-site/pom.xml | 14 +++++++------- java/stepfunctions-job-poller/pom.xml | 6 +++--- 11 files changed, 56 insertions(+), 38 deletions(-) diff --git a/java/custom-resource/pom.xml b/java/custom-resource/pom.xml index 766a45a96..0f065bd79 100644 --- a/java/custom-resource/pom.xml +++ b/java/custom-resource/pom.xml @@ -55,19 +55,19 @@ software.amazon.awscdk core - 1.18.0 + [1.19.0, 2) software.amazon.awscdk cloudformation - 1.18.0 + [1.19.0, 2) software.amazon.awscdk lambda - 1.18.0 + [1.19.0, 2) diff --git a/java/ecs/fargate-load-balanced-service/pom.xml b/java/ecs/fargate-load-balanced-service/pom.xml index 478e90263..a0d1a0a47 100644 --- a/java/ecs/fargate-load-balanced-service/pom.xml +++ b/java/ecs/fargate-load-balanced-service/pom.xml @@ -39,19 +39,19 @@ software.amazon.awscdk core - 1.16.0.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk ecs - 1.16.0.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk ecs-patterns - 1.16.0.DEVPREVIEW + [1.19.0, 2) diff --git a/java/ecs/fargate-load-balanced-service/src/test/resources/com/amazonaws/cdk/examples/expected.cfn.json b/java/ecs/fargate-load-balanced-service/src/test/resources/com/amazonaws/cdk/examples/expected.cfn.json index e529f3037..6cd2aa656 100644 --- a/java/ecs/fargate-load-balanced-service/src/test/resources/com/amazonaws/cdk/examples/expected.cfn.json +++ b/java/ecs/fargate-load-balanced-service/src/test/resources/com/amazonaws/cdk/examples/expected.cfn.json @@ -90,7 +90,13 @@ "MyVpcPublicSubnet1EIP096967CB": { "Type": "AWS::EC2::EIP", "Properties": { - "Domain": "vpc" + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "test/MyVpc/PublicSubnet1" + } + ] } }, "MyVpcPublicSubnet1NATGatewayAD3400C1": { @@ -188,7 +194,13 @@ "MyVpcPublicSubnet2EIP8CCBA239": { "Type": "AWS::EC2::EIP", "Properties": { - "Domain": "vpc" + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "test/MyVpc/PublicSubnet2" + } +] } }, "MyVpcPublicSubnet2NATGateway91BFBEC9": { diff --git a/java/hello-world/pom.xml b/java/hello-world/pom.xml index c72a83801..f9fff1893 100644 --- a/java/hello-world/pom.xml +++ b/java/hello-world/pom.xml @@ -55,38 +55,38 @@ software.amazon.awscdk core - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk autoscaling - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk ec2 - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk s3 - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk sns - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk sqs - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk sns-subscriptions - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) diff --git a/java/lambda-cron/pom.xml b/java/lambda-cron/pom.xml index 5d5716c17..00e72d9bc 100644 --- a/java/lambda-cron/pom.xml +++ b/java/lambda-cron/pom.xml @@ -55,19 +55,19 @@ software.amazon.awscdk core - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk lambda - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) software.amazon.awscdk events-targets - [1.17.0.DEVPREVIEW, 2) + [1.19.0, 2) diff --git a/java/my-widget-service/pom.xml b/java/my-widget-service/pom.xml index ed2913f3f..54c78f13f 100644 --- a/java/my-widget-service/pom.xml +++ b/java/my-widget-service/pom.xml @@ -58,22 +58,22 @@ software.amazon.awscdk core - 1.18.0 + [1.19.0, 2) software.amazon.awscdk s3 - 1.18.0 + [1.19.0, 2) software.amazon.awscdk apigateway - 1.18.0 + [1.19.0, 2) software.amazon.awscdk iam - 1.18.0 + [1.19.0, 2) diff --git a/java/package.json b/java/package.json index 5f1eb3c6c..182121dbc 100644 --- a/java/package.json +++ b/java/package.json @@ -1,5 +1,5 @@ { "devDependencies": { - "aws-cdk": "1.0.0" + "aws-cdk": "*" } } diff --git a/java/resource-overrides/pom.xml b/java/resource-overrides/pom.xml index 5c052bc92..74aa15dda 100644 --- a/java/resource-overrides/pom.xml +++ b/java/resource-overrides/pom.xml @@ -57,25 +57,25 @@ software.amazon.awscdk core - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk s3 - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk ec2 - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk autoscaling - 1.17.1.DEVPREVIEW + [1.19.0, 2) diff --git a/java/resource-overrides/src/test/resources/software/amazon/awscdk/examples/testResourceOverrides.expected.json b/java/resource-overrides/src/test/resources/software/amazon/awscdk/examples/testResourceOverrides.expected.json index 20c62234d..5d76d4f5c 100644 --- a/java/resource-overrides/src/test/resources/software/amazon/awscdk/examples/testResourceOverrides.expected.json +++ b/java/resource-overrides/src/test/resources/software/amazon/awscdk/examples/testResourceOverrides.expected.json @@ -154,7 +154,13 @@ "VPCPublicSubnet1EIP6AD938E8": { "Type": "AWS::EC2::EIP", "Properties": { - "Domain": "vpc" + "Domain": "vpc", + "Tags": [ + { + "Key": "Name", + "Value": "resource-overrides/VPC/PublicSubnet1" + } + ] } }, "VPCPublicSubnet1NATGatewayE0556630": { diff --git a/java/static-site/pom.xml b/java/static-site/pom.xml index 9d327f1c2..e4ed78e06 100644 --- a/java/static-site/pom.xml +++ b/java/static-site/pom.xml @@ -55,7 +55,7 @@ software.amazon.awscdk core - 1.17.1.DEVPREVIEW + [1.19.0, 2) @@ -63,32 +63,32 @@ software.amazon.awscdk cloudfront - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk route53 - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk route53-targets - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk s3 - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk s3-deployment - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk certificatemanager - 1.17.1.DEVPREVIEW + [1.19.0, 2) diff --git a/java/stepfunctions-job-poller/pom.xml b/java/stepfunctions-job-poller/pom.xml index 51bb932e9..e99c11d72 100644 --- a/java/stepfunctions-job-poller/pom.xml +++ b/java/stepfunctions-job-poller/pom.xml @@ -54,7 +54,7 @@ software.amazon.awscdk core - 1.17.1.DEVPREVIEW + [1.19.0, 2) @@ -62,12 +62,12 @@ software.amazon.awscdk stepfunctions - 1.17.1.DEVPREVIEW + [1.19.0, 2) software.amazon.awscdk stepfunctions-tasks - 1.17.1.DEVPREVIEW + [1.19.0, 2)