Skip to content

Commit 3951f09

Browse files
feat(cfnspec): cloudformation spec v101.0.0 (#23294)
1 parent 58fd99f commit 3951f09

File tree

266 files changed

+12173
-6778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+12173
-6778
lines changed

packages/@aws-cdk/aws-ec2/lib/vpc-flow-logs.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ export class FlowLog extends FlowLogBase {
676676
}
677677

678678
const flowLog = new CfnFlowLog(this, 'FlowLog', {
679-
destinationOptions: destinationConfig.destinationOptions,
679+
destinationOptions: renderDestinationOptions(destinationConfig.destinationOptions),
680680
deliverLogsPermissionArn: this.iamRole ? this.iamRole.roleArn : undefined,
681681
logDestinationType: destinationConfig.logDestinationType,
682682
logGroupName: this.logGroup ? this.logGroup.logGroupName : undefined,
@@ -694,3 +694,13 @@ export class FlowLog extends FlowLogBase {
694694
this.node.defaultChild = flowLog;
695695
}
696696
}
697+
698+
function renderDestinationOptions(opts: DestinationOptions | undefined): CfnFlowLog.DestinationOptionsProperty | undefined {
699+
if (opts === undefined) { return undefined; }
700+
701+
return {
702+
fileFormat: opts.fileFormat ?? 'plain-text',
703+
hiveCompatiblePartitions: opts.hiveCompatiblePartitions ?? false,
704+
perHourPartition: opts.perHourPartition ?? false,
705+
};
706+
}

packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.js.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"version": "21.0.0",
33
"files": {
4-
"b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": {
4+
"3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac": {
55
"source": {
6-
"path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle",
6+
"path": "asset.3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac.bundle",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip",
12+
"objectKey": "3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac.zip",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}
1616
},
17-
"1dcf759cd2c8928f5b1acfbf439f1751e25367a5ac61ba5e640ff8b78fdf89f7": {
17+
"dd951509b1e22484b40a66a661cb8cebce3087b8cb381e3dcf02e641e5eb08cd": {
1818
"source": {
1919
"path": "FlowLogsDefaultTestDeployAssert6AFD1854.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "1dcf759cd2c8928f5b1acfbf439f1751e25367a5ac61ba5e640ff8b78fdf89f7.json",
25+
"objectKey": "dd951509b1e22484b40a66a661cb8cebce3087b8cb381e3dcf02e641e5eb08cd.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}

packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.js.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
},
3333
"flattenResponse": "false",
34-
"salt": "1666810703150"
34+
"salt": "1668693953813"
3535
},
3636
"UpdateReplacePolicy": "Delete",
3737
"DeletionPolicy": "Delete"
@@ -115,7 +115,7 @@
115115
"S3Bucket": {
116116
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
117117
},
118-
"S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip"
118+
"S3Key": "3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac.zip"
119119
},
120120
"Timeout": 120,
121121
"Handler": "index.handler",

packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.js.snapshot/FlowLogsFeatureFlag.assets.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"version": "21.0.0",
33
"files": {
4-
"2db53e096625b4b167fb15dd7bdc246692b381f45e28c509614fef7d41c20bc9": {
4+
"8f4f8db3ea3ad2d5f5678275c75dce7d9b67b46d8df7d92c62913bdc5a03cd3f": {
55
"source": {
66
"path": "FlowLogsFeatureFlag.template.json",
77
"packaging": "file"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "2db53e096625b4b167fb15dd7bdc246692b381f45e28c509614fef7d41c20bc9.json",
12+
"objectKey": "8f4f8db3ea3ad2d5f5678275c75dce7d9b67b46d8df7d92c62913bdc5a03cd3f.json",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}

packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.js.snapshot/FlowLogsFeatureFlag.template.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@
524524
"Ref": "VPCB9E5F0B4"
525525
},
526526
"ResourceType": "VPC",
527-
"TrafficType": "ALL",
528527
"LogDestination": {
529528
"Fn::GetAtt": [
530529
"VPCFlowLogsS3BucketFB7DC2BE",
@@ -537,7 +536,8 @@
537536
"Key": "Name",
538537
"Value": "FlowLogsFeatureFlag/VPC"
539538
}
540-
]
539+
],
540+
"TrafficType": "ALL"
541541
}
542542
},
543543
"VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456": {
@@ -673,11 +673,10 @@
673673
"Ref": "VPCB9E5F0B4"
674674
},
675675
"ResourceType": "VPC",
676-
"TrafficType": "ALL",
677676
"DestinationOptions": {
678-
"fileFormat": "plain-text",
679-
"perHourPartition": false,
680-
"hiveCompatiblePartitions": true
677+
"FileFormat": "plain-text",
678+
"HiveCompatiblePartitions": true,
679+
"PerHourPartition": false
681680
},
682681
"LogDestination": {
683682
"Fn::GetAtt": [
@@ -691,7 +690,8 @@
691690
"Key": "Name",
692691
"Value": "FlowLogsFeatureFlag/VPC"
693692
}
694-
]
693+
],
694+
"TrafficType": "ALL"
695695
}
696696
},
697697
"FlowLogsInstanceInstanceSecurityGroupF61782E0": {

packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.js.snapshot/FlowLogsTestStack.assets.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
{
22
"version": "21.0.0",
33
"files": {
4-
"bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d": {
4+
"33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": {
55
"source": {
6-
"path": "asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d",
6+
"path": "asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c",
77
"packaging": "zip"
88
},
99
"destinations": {
1010
"current_account-current_region": {
1111
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
12-
"objectKey": "bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d.zip",
12+
"objectKey": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip",
1313
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
1414
}
1515
}
1616
},
17-
"2090a74d484bc155b48d7511b99e4921b8f55e488c3fe1500cffede0cdfd33b7": {
17+
"23955aa16c5d59106d93ecce9cedd43aa5782fbf23bb2ef8549b2119345a6f79": {
1818
"source": {
1919
"path": "FlowLogsTestStack.template.json",
2020
"packaging": "file"
2121
},
2222
"destinations": {
2323
"current_account-current_region": {
2424
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
25-
"objectKey": "2090a74d484bc155b48d7511b99e4921b8f55e488c3fe1500cffede0cdfd33b7.json",
25+
"objectKey": "23955aa16c5d59106d93ecce9cedd43aa5782fbf23bb2ef8549b2119345a6f79.json",
2626
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
2727
}
2828
}

packages/@aws-cdk/aws-ec2/test/integ.vpc-flow-logs.js.snapshot/FlowLogsTestStack.template.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,6 @@
524524
"Ref": "VPCB9E5F0B4"
525525
},
526526
"ResourceType": "VPC",
527-
"TrafficType": "ALL",
528527
"LogDestination": {
529528
"Fn::GetAtt": [
530529
"VPCFlowLogsS3BucketFB7DC2BE",
@@ -537,7 +536,8 @@
537536
"Key": "Name",
538537
"Value": "FlowLogsTestStack/VPC"
539538
}
540-
]
539+
],
540+
"TrafficType": "ALL"
541541
}
542542
},
543543
"VPCFlowLogsS3KeyPrefixFlowLogB57F1746": {
@@ -547,7 +547,6 @@
547547
"Ref": "VPCB9E5F0B4"
548548
},
549549
"ResourceType": "VPC",
550-
"TrafficType": "ALL",
551550
"LogDestination": {
552551
"Fn::Join": [
553552
"",
@@ -568,7 +567,8 @@
568567
"Key": "Name",
569568
"Value": "FlowLogsTestStack/VPC"
570569
}
571-
]
570+
],
571+
"TrafficType": "ALL"
572572
}
573573
},
574574
"FlowLogsCWIAMRole017AD736": {
@@ -643,7 +643,6 @@
643643
"Ref": "VPCB9E5F0B4"
644644
},
645645
"ResourceType": "VPC",
646-
"TrafficType": "ALL",
647646
"DeliverLogsPermissionArn": {
648647
"Fn::GetAtt": [
649648
"FlowLogsCWIAMRole017AD736",
@@ -653,7 +652,8 @@
653652
"LogDestinationType": "cloud-watch-logs",
654653
"LogGroupName": {
655654
"Ref": "FlowLogsCWLogGroup0398E8F8"
656-
}
655+
},
656+
"TrafficType": "ALL"
657657
}
658658
},
659659
"Bucket83908E77": {
@@ -888,7 +888,7 @@
888888
"S3Bucket": {
889889
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
890890
},
891-
"S3Key": "bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d.zip"
891+
"S3Key": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip"
892892
},
893893
"Timeout": 900,
894894
"MemorySize": 128,

0 commit comments

Comments
 (0)