diff --git a/packages/@aws-cdk/aws-cloud9/lib/environment.ts b/packages/@aws-cdk/aws-cloud9/lib/environment.ts index b987320d92717..15d7390dd6ee5 100644 --- a/packages/@aws-cdk/aws-cloud9/lib/environment.ts +++ b/packages/@aws-cdk/aws-cloud9/lib/environment.ts @@ -34,6 +34,8 @@ export enum ConnectionType { CONNECT_SSH = 'CONNECT_SSH', /** * Connect through AWS Systems Manager + * When using SSM, service role and instance profile aren't automatically created. + * See https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html#service-role-ssm */ CONNECT_SSM = 'CONNECT_SSM' } diff --git a/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/C9Stack.assets.json b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/C9Stack.assets.json similarity index 73% rename from packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/C9Stack.assets.json rename to packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/C9Stack.assets.json index 09f754a31bd38..a6a9035bd54f9 100644 --- a/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/C9Stack.assets.json +++ b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/C9Stack.assets.json @@ -1,7 +1,7 @@ { "version": "20.0.0", "files": { - "f9e7c320234302f703a47f0be7da188a1e91f7863c71a04835efd508d926216c": { + "bce46c387f7a562ced8e71e7f0c8bd1829de8aa12a8f5938bf4ccba9f3748d84": { "source": { "path": "C9Stack.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "f9e7c320234302f703a47f0be7da188a1e91f7863c71a04835efd508d926216c.json", + "objectKey": "bce46c387f7a562ced8e71e7f0c8bd1829de8aa12a8f5938bf4ccba9f3748d84.json", "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } diff --git a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/C9Stack.template.json b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/C9Stack.template.json index 1a092ba57bbf1..6c777401c64d5 100644 --- a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/C9Stack.template.json +++ b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/C9Stack.template.json @@ -360,9 +360,9 @@ "C9EnvF05FC3BE": { "Type": "AWS::Cloud9::EnvironmentEC2", "Properties": { + "InstanceType": "t2.micro", "ConnectionType": "CONNECT_SSH", "ImageId": "amazonlinux-2-x86_64", - "InstanceType": "t2.micro", "Repositories": [ { "PathComponent": "/foo", diff --git a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/manifest.json index 1bc910cfa1616..8b6959ea3368c 100644 --- a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", diff --git a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/tree.json b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/tree.json index 833dd191139cd..86cc5d5c7ac6f 100644 --- a/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-cloud9/test/cloud9.integ.snapshot/tree.json @@ -8,8 +8,8 @@ "id": "Tree", "path": "Tree", "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.71" } }, "C9Stack": { @@ -646,6 +646,8 @@ "aws:cdk:cloudformation:type": "AWS::Cloud9::EnvironmentEC2", "aws:cdk:cloudformation:props": { "instanceType": "t2.micro", + "connectionType": "CONNECT_SSH", + "imageId": "amazonlinux-2-x86_64", "repositories": [ { "repositoryUrl": { diff --git a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/C9Stack.template.json b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/C9ConnectionTypeStack.template.json similarity index 91% rename from packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/C9Stack.template.json rename to packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/C9ConnectionTypeStack.template.json index 2633ca59ff48a..e9d9799ae8e87 100644 --- a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/C9Stack.template.json +++ b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/C9ConnectionTypeStack.template.json @@ -10,7 +10,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC" + "Value": "C9ConnectionTypeStack/VPC" } ] } @@ -42,7 +42,7 @@ }, { "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" + "Value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -56,7 +56,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" + "Value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -94,7 +94,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" + "Value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -114,7 +114,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" + "Value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -146,7 +146,7 @@ }, { "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet2" + "Value": "C9ConnectionTypeStack/VPC/PublicSubnet2" } ] } @@ -160,7 +160,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet2" + "Value": "C9ConnectionTypeStack/VPC/PublicSubnet2" } ] } @@ -218,7 +218,7 @@ }, { "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet1" + "Value": "C9ConnectionTypeStack/VPC/PrivateSubnet1" } ] } @@ -232,7 +232,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet1" + "Value": "C9ConnectionTypeStack/VPC/PrivateSubnet1" } ] } @@ -287,7 +287,7 @@ }, { "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet2" + "Value": "C9ConnectionTypeStack/VPC/PrivateSubnet2" } ] } @@ -301,7 +301,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet2" + "Value": "C9ConnectionTypeStack/VPC/PrivateSubnet2" } ] } @@ -335,7 +335,7 @@ "Tags": [ { "Key": "Name", - "Value": "C9Stack/VPC" + "Value": "C9ConnectionTypeStack/VPC" } ] } @@ -360,9 +360,9 @@ "C9EnvF05FC3BE": { "Type": "AWS::Cloud9::EnvironmentEC2", "Properties": { - "ConnectionType": "CONNECT_SSM", - "ImageId": "amazonlinux-2-x86_64", "InstanceType": "t2.micro", + "ConnectionType": "CONNECT_SSH", + "ImageId": "amazonlinux-2-x86_64", "Repositories": [ { "PathComponent": "/foo", diff --git a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/cdk.out index 90bef2e09ad39..588d7b269d34f 100644 --- a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"17.0.0"} \ No newline at end of file +{"version":"20.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/cloud9connectiontypeDefaultTestDeployAssert401C3608.template.json b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/cloud9connectiontypeDefaultTestDeployAssert401C3608.template.json new file mode 100644 index 0000000000000..9e26dfeeb6e64 --- /dev/null +++ b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/cloud9connectiontypeDefaultTestDeployAssert401C3608.template.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/integ.json b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/integ.json index 03cd2c90c6bea..06ecc1408cd50 100644 --- a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/integ.json @@ -1,14 +1,11 @@ { "version": "20.0.0", "testCases": { - "integ.connection-type": { + "cloud-9-connection-type/DefaultTest": { "stacks": [ - "C9Stack" + "C9ConnectionTypeStack" ], - "diffAssets": false, - "stackUpdateWorkflow": true + "assertionStack": "cloud9connectiontypeDefaultTestDeployAssert401C3608" } - }, - "synthContext": {}, - "enableLookups": false + } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/manifest.json index 1bc910cfa1616..ca7bd12fc8f3f 100644 --- a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "17.0.0", + "version": "20.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -7,166 +7,175 @@ "file": "tree.json" } }, - "C9Stack": { + "C9ConnectionTypeStack": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "C9Stack.template.json", + "templateFile": "C9ConnectionTypeStack.template.json", "validateOnSynth": false }, "metadata": { - "/C9Stack/VPC/Resource": [ + "/C9ConnectionTypeStack/VPC/Resource": [ { "type": "aws:cdk:logicalId", "data": "VPCB9E5F0B4" } ], - "/C9Stack/VPC/PublicSubnet1/Subnet": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1SubnetB4246D30" } ], - "/C9Stack/VPC/PublicSubnet1/RouteTable": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableFEE4B781" } ], - "/C9Stack/VPC/PublicSubnet1/RouteTableAssociation": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1RouteTableAssociation0B0896DC" } ], - "/C9Stack/VPC/PublicSubnet1/DefaultRoute": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1DefaultRoute91CEF279" } ], - "/C9Stack/VPC/PublicSubnet1/EIP": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet1/EIP": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1EIP6AD938E8" } ], - "/C9Stack/VPC/PublicSubnet1/NATGateway": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet1/NATGateway": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet1NATGatewayE0556630" } ], - "/C9Stack/VPC/PublicSubnet2/Subnet": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2Subnet74179F39" } ], - "/C9Stack/VPC/PublicSubnet2/RouteTable": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTable6F1A15F1" } ], - "/C9Stack/VPC/PublicSubnet2/RouteTableAssociation": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2RouteTableAssociation5A808732" } ], - "/C9Stack/VPC/PublicSubnet2/DefaultRoute": [ + "/C9ConnectionTypeStack/VPC/PublicSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPublicSubnet2DefaultRouteB7481BBA" } ], - "/C9Stack/VPC/PrivateSubnet1/Subnet": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet1/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1Subnet8BCA10E0" } ], - "/C9Stack/VPC/PrivateSubnet1/RouteTable": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet1/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableBE8A6027" } ], - "/C9Stack/VPC/PrivateSubnet1/RouteTableAssociation": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet1/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1RouteTableAssociation347902D1" } ], - "/C9Stack/VPC/PrivateSubnet1/DefaultRoute": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet1/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet1DefaultRouteAE1D6490" } ], - "/C9Stack/VPC/PrivateSubnet2/Subnet": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet2/Subnet": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2SubnetCFCDAA7A" } ], - "/C9Stack/VPC/PrivateSubnet2/RouteTable": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet2/RouteTable": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTable0A19E10E" } ], - "/C9Stack/VPC/PrivateSubnet2/RouteTableAssociation": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet2/RouteTableAssociation": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2RouteTableAssociation0C73D413" } ], - "/C9Stack/VPC/PrivateSubnet2/DefaultRoute": [ + "/C9ConnectionTypeStack/VPC/PrivateSubnet2/DefaultRoute": [ { "type": "aws:cdk:logicalId", "data": "VPCPrivateSubnet2DefaultRouteF4F5CFD2" } ], - "/C9Stack/VPC/IGW": [ + "/C9ConnectionTypeStack/VPC/IGW": [ { "type": "aws:cdk:logicalId", "data": "VPCIGWB7E252D3" } ], - "/C9Stack/VPC/VPCGW": [ + "/C9ConnectionTypeStack/VPC/VPCGW": [ { "type": "aws:cdk:logicalId", "data": "VPCVPCGW99B986DC" } ], - "/C9Stack/Repo/Resource": [ + "/C9ConnectionTypeStack/Repo/Resource": [ { "type": "aws:cdk:logicalId", "data": "Repo02AC86CF" } ], - "/C9Stack/C9Env/Resource": [ + "/C9ConnectionTypeStack/C9Env/Resource": [ { "type": "aws:cdk:logicalId", "data": "C9EnvF05FC3BE" } ], - "/C9Stack/URL": [ + "/C9ConnectionTypeStack/URL": [ { "type": "aws:cdk:logicalId", "data": "URL" } ], - "/C9Stack/ARN": [ + "/C9ConnectionTypeStack/ARN": [ { "type": "aws:cdk:logicalId", "data": "ARN" } ] }, - "displayName": "C9Stack" + "displayName": "C9ConnectionTypeStack" + }, + "cloud9connectiontypeDefaultTestDeployAssert401C3608": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "cloud9connectiontypeDefaultTestDeployAssert401C3608.template.json", + "validateOnSynth": false + }, + "displayName": "cloud-9-connection-type/DefaultTest/DeployAssert" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/tree.json b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/tree.json index 833dd191139cd..7b5ee51dd7693 100644 --- a/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-cloud9/test/connection-type.integ.snapshot/tree.json @@ -8,21 +8,21 @@ "id": "Tree", "path": "Tree", "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.71" } }, - "C9Stack": { - "id": "C9Stack", - "path": "C9Stack", + "C9ConnectionTypeStack": { + "id": "C9ConnectionTypeStack", + "path": "C9ConnectionTypeStack", "children": { "VPC": { "id": "VPC", - "path": "C9Stack/VPC", + "path": "C9ConnectionTypeStack/VPC", "children": { "Resource": { "id": "Resource", - "path": "C9Stack/VPC/Resource", + "path": "C9ConnectionTypeStack/VPC/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPC", "aws:cdk:cloudformation:props": { @@ -33,7 +33,7 @@ "tags": [ { "key": "Name", - "value": "C9Stack/VPC" + "value": "C9ConnectionTypeStack/VPC" } ] } @@ -45,11 +45,11 @@ }, "PublicSubnet1": { "id": "PublicSubnet1", - "path": "C9Stack/VPC/PublicSubnet1", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "C9Stack/VPC/PublicSubnet1/Subnet", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -77,7 +77,7 @@ }, { "key": "Name", - "value": "C9Stack/VPC/PublicSubnet1" + "value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -89,7 +89,7 @@ }, "Acl": { "id": "Acl", - "path": "C9Stack/VPC/PublicSubnet1/Acl", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1/Acl", "constructInfo": { "fqn": "@aws-cdk/core.Resource", "version": "0.0.0" @@ -97,7 +97,7 @@ }, "RouteTable": { "id": "RouteTable", - "path": "C9Stack/VPC/PublicSubnet1/RouteTable", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { @@ -107,7 +107,7 @@ "tags": [ { "key": "Name", - "value": "C9Stack/VPC/PublicSubnet1" + "value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -119,7 +119,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "C9Stack/VPC/PublicSubnet1/RouteTableAssociation", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -138,7 +138,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "C9Stack/VPC/PublicSubnet1/DefaultRoute", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -158,7 +158,7 @@ }, "EIP": { "id": "EIP", - "path": "C9Stack/VPC/PublicSubnet1/EIP", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1/EIP", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::EIP", "aws:cdk:cloudformation:props": { @@ -166,7 +166,7 @@ "tags": [ { "key": "Name", - "value": "C9Stack/VPC/PublicSubnet1" + "value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -178,7 +178,7 @@ }, "NATGateway": { "id": "NATGateway", - "path": "C9Stack/VPC/PublicSubnet1/NATGateway", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet1/NATGateway", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::NatGateway", "aws:cdk:cloudformation:props": { @@ -194,7 +194,7 @@ "tags": [ { "key": "Name", - "value": "C9Stack/VPC/PublicSubnet1" + "value": "C9ConnectionTypeStack/VPC/PublicSubnet1" } ] } @@ -212,11 +212,11 @@ }, "PublicSubnet2": { "id": "PublicSubnet2", - "path": "C9Stack/VPC/PublicSubnet2", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "C9Stack/VPC/PublicSubnet2/Subnet", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -244,7 +244,7 @@ }, { "key": "Name", - "value": "C9Stack/VPC/PublicSubnet2" + "value": "C9ConnectionTypeStack/VPC/PublicSubnet2" } ] } @@ -256,7 +256,7 @@ }, "Acl": { "id": "Acl", - "path": "C9Stack/VPC/PublicSubnet2/Acl", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet2/Acl", "constructInfo": { "fqn": "@aws-cdk/core.Resource", "version": "0.0.0" @@ -264,7 +264,7 @@ }, "RouteTable": { "id": "RouteTable", - "path": "C9Stack/VPC/PublicSubnet2/RouteTable", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { @@ -274,7 +274,7 @@ "tags": [ { "key": "Name", - "value": "C9Stack/VPC/PublicSubnet2" + "value": "C9ConnectionTypeStack/VPC/PublicSubnet2" } ] } @@ -286,7 +286,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "C9Stack/VPC/PublicSubnet2/RouteTableAssociation", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -305,7 +305,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "C9Stack/VPC/PublicSubnet2/DefaultRoute", + "path": "C9ConnectionTypeStack/VPC/PublicSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -331,11 +331,11 @@ }, "PrivateSubnet1": { "id": "PrivateSubnet1", - "path": "C9Stack/VPC/PrivateSubnet1", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet1", "children": { "Subnet": { "id": "Subnet", - "path": "C9Stack/VPC/PrivateSubnet1/Subnet", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet1/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -363,7 +363,7 @@ }, { "key": "Name", - "value": "C9Stack/VPC/PrivateSubnet1" + "value": "C9ConnectionTypeStack/VPC/PrivateSubnet1" } ] } @@ -375,7 +375,7 @@ }, "Acl": { "id": "Acl", - "path": "C9Stack/VPC/PrivateSubnet1/Acl", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet1/Acl", "constructInfo": { "fqn": "@aws-cdk/core.Resource", "version": "0.0.0" @@ -383,7 +383,7 @@ }, "RouteTable": { "id": "RouteTable", - "path": "C9Stack/VPC/PrivateSubnet1/RouteTable", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet1/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { @@ -393,7 +393,7 @@ "tags": [ { "key": "Name", - "value": "C9Stack/VPC/PrivateSubnet1" + "value": "C9ConnectionTypeStack/VPC/PrivateSubnet1" } ] } @@ -405,7 +405,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "C9Stack/VPC/PrivateSubnet1/RouteTableAssociation", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet1/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -424,7 +424,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "C9Stack/VPC/PrivateSubnet1/DefaultRoute", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet1/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -450,11 +450,11 @@ }, "PrivateSubnet2": { "id": "PrivateSubnet2", - "path": "C9Stack/VPC/PrivateSubnet2", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet2", "children": { "Subnet": { "id": "Subnet", - "path": "C9Stack/VPC/PrivateSubnet2/Subnet", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet2/Subnet", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Subnet", "aws:cdk:cloudformation:props": { @@ -482,7 +482,7 @@ }, { "key": "Name", - "value": "C9Stack/VPC/PrivateSubnet2" + "value": "C9ConnectionTypeStack/VPC/PrivateSubnet2" } ] } @@ -494,7 +494,7 @@ }, "Acl": { "id": "Acl", - "path": "C9Stack/VPC/PrivateSubnet2/Acl", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet2/Acl", "constructInfo": { "fqn": "@aws-cdk/core.Resource", "version": "0.0.0" @@ -502,7 +502,7 @@ }, "RouteTable": { "id": "RouteTable", - "path": "C9Stack/VPC/PrivateSubnet2/RouteTable", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet2/RouteTable", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable", "aws:cdk:cloudformation:props": { @@ -512,7 +512,7 @@ "tags": [ { "key": "Name", - "value": "C9Stack/VPC/PrivateSubnet2" + "value": "C9ConnectionTypeStack/VPC/PrivateSubnet2" } ] } @@ -524,7 +524,7 @@ }, "RouteTableAssociation": { "id": "RouteTableAssociation", - "path": "C9Stack/VPC/PrivateSubnet2/RouteTableAssociation", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet2/RouteTableAssociation", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation", "aws:cdk:cloudformation:props": { @@ -543,7 +543,7 @@ }, "DefaultRoute": { "id": "DefaultRoute", - "path": "C9Stack/VPC/PrivateSubnet2/DefaultRoute", + "path": "C9ConnectionTypeStack/VPC/PrivateSubnet2/DefaultRoute", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::Route", "aws:cdk:cloudformation:props": { @@ -569,14 +569,14 @@ }, "IGW": { "id": "IGW", - "path": "C9Stack/VPC/IGW", + "path": "C9ConnectionTypeStack/VPC/IGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway", "aws:cdk:cloudformation:props": { "tags": [ { "key": "Name", - "value": "C9Stack/VPC" + "value": "C9ConnectionTypeStack/VPC" } ] } @@ -588,7 +588,7 @@ }, "VPCGW": { "id": "VPCGW", - "path": "C9Stack/VPC/VPCGW", + "path": "C9ConnectionTypeStack/VPC/VPCGW", "attributes": { "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment", "aws:cdk:cloudformation:props": { @@ -613,11 +613,11 @@ }, "Repo": { "id": "Repo", - "path": "C9Stack/Repo", + "path": "C9ConnectionTypeStack/Repo", "children": { "Resource": { "id": "Resource", - "path": "C9Stack/Repo/Resource", + "path": "C9ConnectionTypeStack/Repo/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::CodeCommit::Repository", "aws:cdk:cloudformation:props": { @@ -637,15 +637,17 @@ }, "C9Env": { "id": "C9Env", - "path": "C9Stack/C9Env", + "path": "C9ConnectionTypeStack/C9Env", "children": { "Resource": { "id": "Resource", - "path": "C9Stack/C9Env/Resource", + "path": "C9ConnectionTypeStack/C9Env/Resource", "attributes": { "aws:cdk:cloudformation:type": "AWS::Cloud9::EnvironmentEC2", "aws:cdk:cloudformation:props": { "instanceType": "t2.micro", + "connectionType": "CONNECT_SSH", + "imageId": "amazonlinux-2-x86_64", "repositories": [ { "repositoryUrl": { @@ -675,7 +677,7 @@ }, "URL": { "id": "URL", - "path": "C9Stack/URL", + "path": "C9ConnectionTypeStack/URL", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -683,7 +685,7 @@ }, "ARN": { "id": "ARN", - "path": "C9Stack/ARN", + "path": "C9ConnectionTypeStack/ARN", "constructInfo": { "fqn": "@aws-cdk/core.CfnOutput", "version": "0.0.0" @@ -694,6 +696,42 @@ "fqn": "@aws-cdk/core.Stack", "version": "0.0.0" } + }, + "cloud-9-connection-type": { + "id": "cloud-9-connection-type", + "path": "cloud-9-connection-type", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "cloud-9-connection-type/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "cloud-9-connection-type/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.71" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "cloud-9-connection-type/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": { diff --git a/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/C9Stack.template.json b/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/C9Stack.template.json deleted file mode 100644 index f8edd13a6f341..0000000000000 --- a/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/C9Stack.template.json +++ /dev/null @@ -1,427 +0,0 @@ -{ - "Resources": { - "VPCB9E5F0B4": { - "Type": "AWS::EC2::VPC", - "Properties": { - "CidrBlock": "10.0.0.0/16", - "EnableDnsHostnames": true, - "EnableDnsSupport": true, - "InstanceTenancy": "default", - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC" - } - ] - } - }, - "VPCPublicSubnet1SubnetB4246D30": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": { - "Fn::Select": [ - 0, - { - "Fn::GetAZs": "" - } - ] - }, - "CidrBlock": "10.0.0.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableFEE4B781": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1RouteTableAssociation0B0896DC": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - }, - "VPCPublicSubnet1DefaultRoute91CEF279": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet1RouteTableFEE4B781" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPublicSubnet1EIP6AD938E8": { - "Type": "AWS::EC2::EIP", - "Properties": { - "Domain": "vpc", - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet1NATGatewayE0556630": { - "Type": "AWS::EC2::NatGateway", - "Properties": { - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - }, - "AllocationId": { - "Fn::GetAtt": [ - "VPCPublicSubnet1EIP6AD938E8", - "AllocationId" - ] - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet1" - } - ] - } - }, - "VPCPublicSubnet2Subnet74179F39": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": { - "Fn::Select": [ - 1, - { - "Fn::GetAZs": "" - } - ] - }, - "CidrBlock": "10.0.64.0/18", - "MapPublicIpOnLaunch": true, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Public" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Public" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTable6F1A15F1": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PublicSubnet2" - } - ] - } - }, - "VPCPublicSubnet2RouteTableAssociation5A808732": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "SubnetId": { - "Ref": "VPCPublicSubnet2Subnet74179F39" - } - } - }, - "VPCPublicSubnet2DefaultRouteB7481BBA": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPublicSubnet2RouteTable6F1A15F1" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "GatewayId": { - "Ref": "VPCIGWB7E252D3" - } - }, - "DependsOn": [ - "VPCVPCGW99B986DC" - ] - }, - "VPCPrivateSubnet1Subnet8BCA10E0": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": { - "Fn::Select": [ - 0, - { - "Fn::GetAZs": "" - } - ] - }, - "CidrBlock": "10.0.128.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableBE8A6027": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet1" - } - ] - } - }, - "VPCPrivateSubnet1RouteTableAssociation347902D1": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet1Subnet8BCA10E0" - } - } - }, - "VPCPrivateSubnet1DefaultRouteAE1D6490": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet1RouteTableBE8A6027" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCPrivateSubnet2SubnetCFCDAA7A": { - "Type": "AWS::EC2::Subnet", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "AvailabilityZone": { - "Fn::Select": [ - 1, - { - "Fn::GetAZs": "" - } - ] - }, - "CidrBlock": "10.0.192.0/18", - "MapPublicIpOnLaunch": false, - "Tags": [ - { - "Key": "aws-cdk:subnet-name", - "Value": "Private" - }, - { - "Key": "aws-cdk:subnet-type", - "Value": "Private" - }, - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTable0A19E10E": { - "Type": "AWS::EC2::RouteTable", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC/PrivateSubnet2" - } - ] - } - }, - "VPCPrivateSubnet2RouteTableAssociation0C73D413": { - "Type": "AWS::EC2::SubnetRouteTableAssociation", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "SubnetId": { - "Ref": "VPCPrivateSubnet2SubnetCFCDAA7A" - } - } - }, - "VPCPrivateSubnet2DefaultRouteF4F5CFD2": { - "Type": "AWS::EC2::Route", - "Properties": { - "RouteTableId": { - "Ref": "VPCPrivateSubnet2RouteTable0A19E10E" - }, - "DestinationCidrBlock": "0.0.0.0/0", - "NatGatewayId": { - "Ref": "VPCPublicSubnet1NATGatewayE0556630" - } - } - }, - "VPCIGWB7E252D3": { - "Type": "AWS::EC2::InternetGateway", - "Properties": { - "Tags": [ - { - "Key": "Name", - "Value": "C9Stack/VPC" - } - ] - } - }, - "VPCVPCGW99B986DC": { - "Type": "AWS::EC2::VPCGatewayAttachment", - "Properties": { - "VpcId": { - "Ref": "VPCB9E5F0B4" - }, - "InternetGatewayId": { - "Ref": "VPCIGWB7E252D3" - } - } - }, - "C9EnvF05FC3BE": { - "Type": "AWS::Cloud9::EnvironmentEC2", - "Properties": { - "InstanceType": "t2.micro", - "ConnectionType": "CONNECT_SSH", - "ImageId": "amazonlinux-2-x86_64", - "SubnetId": { - "Ref": "VPCPublicSubnet1SubnetB4246D30" - } - } - } - }, - "Outputs": { - "URL": { - "Value": { - "Fn::Join": [ - "", - [ - "https://", - { - "Ref": "AWS::Region" - }, - ".console.aws.amazon.com/cloud9/ide/", - { - "Ref": "C9EnvF05FC3BE" - } - ] - ] - } - }, - "ARN": { - "Value": { - "Fn::GetAtt": [ - "C9EnvF05FC3BE", - "Arn" - ] - } - } - }, - "Parameters": { - "BootstrapVersion": { - "Type": "AWS::SSM::Parameter::Value", - "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." - } - ] - } - } -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/tree.json b/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/tree.json index d4257f4cb3ed2..98d8020b74152 100644 --- a/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-cloud9/test/image-id.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.71" } }, "cloud9-imageid-integ": { @@ -675,7 +675,7 @@ "path": "ImageIdInteg/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.71" } }, "DeployAssert": { diff --git a/packages/@aws-cdk/aws-cloud9/test/integ.connection-type.ts b/packages/@aws-cdk/aws-cloud9/test/integ.connection-type.ts index 56aa648577ff0..ce9ef6e71df8d 100644 --- a/packages/@aws-cdk/aws-cloud9/test/integ.connection-type.ts +++ b/packages/@aws-cdk/aws-cloud9/test/integ.connection-type.ts @@ -1,6 +1,7 @@ import * as codecommit from '@aws-cdk/aws-codecommit'; import * as ec2 from '@aws-cdk/aws-ec2'; import * as cdk from '@aws-cdk/core'; +import * as integ from '@aws-cdk/integ-tests'; import * as constructs from 'constructs'; import * as cloud9 from '../lib'; import { ConnectionType } from '../lib'; @@ -22,7 +23,7 @@ export class Cloud9Env extends cdk.Stack { // create a cloud9 ec2 environment in a new VPC const c9env = new cloud9.Ec2Environment(this, 'C9Env', { vpc, - connectionType: ConnectionType.CONNECT_SSM, + connectionType: ConnectionType.CONNECT_SSH, // clone repositories into the environment clonedRepositories: [ cloud9.CloneRepository.fromCodeCommit(repo, '/foo'), @@ -35,5 +36,10 @@ export class Cloud9Env extends cdk.Stack { } const app = new cdk.App(); +const stack = new Cloud9Env(app, 'C9ConnectionTypeStack'); -new Cloud9Env(app, 'C9Stack'); +new integ.IntegTest(app, 'cloud-9-connection-type', { + testCases: [stack], +}); + +app.synth();