Skip to content

Commit

Permalink
Merge branch 'main' into kaizencc-patch-8
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jun 15, 2023
2 parents 607a311 + 9c8f549 commit f66bb04
Show file tree
Hide file tree
Showing 17 changed files with 599 additions and 55 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@types/node": "18.11.19",
"@types/prettier": "2.6.0",
"@yarnpkg/lockfile": "^1.1.0",
"cdk-generate-synthetic-examples": "^0.1.260",
"cdk-generate-synthetic-examples": "^0.1.269",
"conventional-changelog-cli": "^2.2.2",
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.11",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "22.0.0",
"version": "31.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
{
"version": "22.0.0",
"version": "31.0.0",
"files": {
"534a1fbecaccb7e2a071086c8085be5c15b2501781767cdeddf754fe3a0ceecb": {
"ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd": {
"source": {
"path": "asset.ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"7151bb47e356bd29580b060ae0e46d6454585c5abca0d036f27da245eccd1fd9": {
"source": {
"path": "aws-cdk-ec2-lt-metadata-1.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "534a1fbecaccb7e2a071086c8085be5c15b2501781767cdeddf754fe3a0ceecb.json",
"objectKey": "7151bb47e356bd29580b060ae0e46d6454585c5abca0d036f27da245eccd1fd9.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,152 @@
{
"Resources": {
"MyVpcF9F0CA6F": {
"Type": "AWS::EC2::VPC",
"Properties": {
"CidrBlock": "10.0.0.0/16",
"EnableDnsHostnames": true,
"EnableDnsSupport": true,
"InstanceTenancy": "default",
"Tags": [
{
"Key": "Name",
"Value": "MyVpc"
}
]
}
},
"MyVpcRestrictDefaultSecurityGroupCustomResourceA4FCCD62": {
"Type": "Custom::VpcRestrictDefaultSG",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E",
"Arn"
]
},
"DefaultSecurityGroupId": {
"Fn::GetAtt": [
"MyVpcF9F0CA6F",
"DefaultSecurityGroup"
]
},
"Account": {
"Ref": "AWS::AccountId"
}
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
]
},
"ManagedPolicyArns": [
{
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
],
"Policies": [
{
"PolicyName": "Inline",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:AuthorizeSecurityGroupIngress",
"ec2:AuthorizeSecurityGroupEgress",
"ec2:RevokeSecurityGroupIngress",
"ec2:RevokeSecurityGroupEgress"
],
"Resource": [
{
"Fn::Join": [
"",
[
"arn:",
{
"Ref": "AWS::Partition"
},
":ec2:",
{
"Ref": "AWS::Region"
},
":",
{
"Ref": "AWS::AccountId"
},
":security-group/",
{
"Fn::GetAtt": [
"MyVpcF9F0CA6F",
"DefaultSecurityGroup"
]
}
]
]
}
]
}
]
}
}
]
}
},
"CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "ba598c1f1d84f7077ea9c16a6b921e4f8acf18e996100e72a8f17da980e64fdd.zip"
},
"Timeout": 900,
"MemorySize": 128,
"Handler": "__entrypoint__.handler",
"Role": {
"Fn::GetAtt": [
"CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0",
"Arn"
]
},
"Runtime": "nodejs16.x",
"Description": "Lambda function for removing all inbound/outbound rules from the VPC default security group"
},
"DependsOn": [
"CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0"
]
},
"sg15CEFF4E3": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "aws-cdk-ec2-lt-metadata-1/sg1",
"SecurityGroupEgress": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow all outbound traffic by default",
"IpProtocol": "-1"
}
],
"VpcId": {
"Ref": "MyVpcF9F0CA6F"
}
}
},
"LTC4631592": {
"Type": "AWS::EC2::LaunchTemplate",
"Properties": {
Expand All @@ -11,6 +158,20 @@
"HttpTokens": "required",
"InstanceMetadataTags": "enabled"
},
"SecurityGroupIds": [
{
"Fn::GetAtt": [
"sg15CEFF4E3",
"GroupId"
]
},
{
"Fn::GetAtt": [
"sg2860DD91F",
"GroupId"
]
}
],
"TagSpecifications": [
{
"ResourceType": "instance",
Expand Down Expand Up @@ -45,6 +206,22 @@
]
}
},
"sg2860DD91F": {
"Type": "AWS::EC2::SecurityGroup",
"Properties": {
"GroupDescription": "aws-cdk-ec2-lt-metadata-1/sg2",
"SecurityGroupEgress": [
{
"CidrIp": "0.0.0.0/0",
"Description": "Allow all outbound traffic by default",
"IpProtocol": "-1"
}
],
"VpcId": {
"Ref": "MyVpcF9F0CA6F"
}
}
},
"LTWithMachineImageAAC227A5": {
"Type": "AWS::EC2::LaunchTemplate",
"Properties": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"22.0.0"}
{"version":"31.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "22.0.0",
"version": "31.0.0",
"testCases": {
"LambdaTest/DefaultTest": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "22.0.0",
"version": "31.0.0",
"artifacts": {
"aws-cdk-ec2-lt-metadata-1.assets": {
"type": "cdk:asset-manifest",
Expand All @@ -17,7 +17,7 @@
"validateOnSynth": false,
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}",
"cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/534a1fbecaccb7e2a071086c8085be5c15b2501781767cdeddf754fe3a0ceecb.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7151bb47e356bd29580b060ae0e46d6454585c5abca0d036f27da245eccd1fd9.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand All @@ -33,12 +33,48 @@
"aws-cdk-ec2-lt-metadata-1.assets"
],
"metadata": {
"/aws-cdk-ec2-lt-metadata-1/MyVpc/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "MyVpcF9F0CA6F"
}
],
"/aws-cdk-ec2-lt-metadata-1/MyVpc/RestrictDefaultSecurityGroupCustomResource/Default": [
{
"type": "aws:cdk:logicalId",
"data": "MyVpcRestrictDefaultSecurityGroupCustomResourceA4FCCD62"
}
],
"/aws-cdk-ec2-lt-metadata-1/Custom::VpcRestrictDefaultSGCustomResourceProvider/Role": [
{
"type": "aws:cdk:logicalId",
"data": "CustomVpcRestrictDefaultSGCustomResourceProviderRole26592FE0"
}
],
"/aws-cdk-ec2-lt-metadata-1/Custom::VpcRestrictDefaultSGCustomResourceProvider/Handler": [
{
"type": "aws:cdk:logicalId",
"data": "CustomVpcRestrictDefaultSGCustomResourceProviderHandlerDC833E5E"
}
],
"/aws-cdk-ec2-lt-metadata-1/sg1/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "sg15CEFF4E3"
}
],
"/aws-cdk-ec2-lt-metadata-1/LT/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "LTC4631592"
}
],
"/aws-cdk-ec2-lt-metadata-1/sg2/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "sg2860DD91F"
}
],
"/aws-cdk-ec2-lt-metadata-1/LTWithMachineImage/Resource": [
{
"type": "aws:cdk:logicalId",
Expand Down
Loading

0 comments on commit f66bb04

Please sign in to comment.