Skip to content

Commit

Permalink
feat(cfnspec): cloudformation spec v101.0.0 (aws#23294)
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-cdk-automation authored and Brennan Ho committed Feb 22, 2023
1 parent 53bc767 commit 90d9d1b
Show file tree
Hide file tree
Showing 266 changed files with 12,173 additions and 6,778 deletions.
12 changes: 11 additions & 1 deletion packages/@aws-cdk/aws-ec2/lib/vpc-flow-logs.ts
Expand Up @@ -676,7 +676,7 @@ export class FlowLog extends FlowLogBase {
}

const flowLog = new CfnFlowLog(this, 'FlowLog', {
destinationOptions: destinationConfig.destinationOptions,
destinationOptions: renderDestinationOptions(destinationConfig.destinationOptions),
deliverLogsPermissionArn: this.iamRole ? this.iamRole.roleArn : undefined,
logDestinationType: destinationConfig.logDestinationType,
logGroupName: this.logGroup ? this.logGroup.logGroupName : undefined,
Expand All @@ -694,3 +694,13 @@ export class FlowLog extends FlowLogBase {
this.node.defaultChild = flowLog;
}
}

function renderDestinationOptions(opts: DestinationOptions | undefined): CfnFlowLog.DestinationOptionsProperty | undefined {
if (opts === undefined) { return undefined; }

return {
fileFormat: opts.fileFormat ?? 'plain-text',
hiveCompatiblePartitions: opts.hiveCompatiblePartitions ?? false,
perHourPartition: opts.perHourPartition ?? false,
};
}
@@ -1,28 +1,28 @@
{
"version": "21.0.0",
"files": {
"b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b": {
"3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac": {
"source": {
"path": "asset.b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.bundle",
"path": "asset.3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip",
"objectKey": "3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"1dcf759cd2c8928f5b1acfbf439f1751e25367a5ac61ba5e640ff8b78fdf89f7": {
"dd951509b1e22484b40a66a661cb8cebce3087b8cb381e3dcf02e641e5eb08cd": {
"source": {
"path": "FlowLogsDefaultTestDeployAssert6AFD1854.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "1dcf759cd2c8928f5b1acfbf439f1751e25367a5ac61ba5e640ff8b78fdf89f7.json",
"objectKey": "dd951509b1e22484b40a66a661cb8cebce3087b8cb381e3dcf02e641e5eb08cd.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Expand Up @@ -31,7 +31,7 @@
}
},
"flattenResponse": "false",
"salt": "1666810703150"
"salt": "1668693953813"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
Expand Down Expand Up @@ -115,7 +115,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "b54b99043c35bd080b9d9d1afce31e3541cf15b679799ba980ed40c837dcb03b.zip"
"S3Key": "3074b79e05e7b98930b6449e01baa3e68b32ecff86328933c2542f7b7fe6fdac.zip"
},
"Timeout": 120,
"Handler": "index.handler",
Expand Down
@@ -1,15 +1,15 @@
{
"version": "21.0.0",
"files": {
"2db53e096625b4b167fb15dd7bdc246692b381f45e28c509614fef7d41c20bc9": {
"8f4f8db3ea3ad2d5f5678275c75dce7d9b67b46d8df7d92c62913bdc5a03cd3f": {
"source": {
"path": "FlowLogsFeatureFlag.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "2db53e096625b4b167fb15dd7bdc246692b381f45e28c509614fef7d41c20bc9.json",
"objectKey": "8f4f8db3ea3ad2d5f5678275c75dce7d9b67b46d8df7d92c62913bdc5a03cd3f.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Expand Up @@ -524,7 +524,6 @@
"Ref": "VPCB9E5F0B4"
},
"ResourceType": "VPC",
"TrafficType": "ALL",
"LogDestination": {
"Fn::GetAtt": [
"VPCFlowLogsS3BucketFB7DC2BE",
Expand All @@ -537,7 +536,8 @@
"Key": "Name",
"Value": "FlowLogsFeatureFlag/VPC"
}
]
],
"TrafficType": "ALL"
}
},
"VPCFlowLogsS3WithDestinationOptionsBucket1B7AC456": {
Expand Down Expand Up @@ -673,11 +673,10 @@
"Ref": "VPCB9E5F0B4"
},
"ResourceType": "VPC",
"TrafficType": "ALL",
"DestinationOptions": {
"fileFormat": "plain-text",
"perHourPartition": false,
"hiveCompatiblePartitions": true
"FileFormat": "plain-text",
"HiveCompatiblePartitions": true,
"PerHourPartition": false
},
"LogDestination": {
"Fn::GetAtt": [
Expand All @@ -691,7 +690,8 @@
"Key": "Name",
"Value": "FlowLogsFeatureFlag/VPC"
}
]
],
"TrafficType": "ALL"
}
},
"FlowLogsInstanceInstanceSecurityGroupF61782E0": {
Expand Down
@@ -1,28 +1,28 @@
{
"version": "21.0.0",
"files": {
"bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d": {
"33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c": {
"source": {
"path": "asset.bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d",
"path": "asset.33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d.zip",
"objectKey": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"2090a74d484bc155b48d7511b99e4921b8f55e488c3fe1500cffede0cdfd33b7": {
"23955aa16c5d59106d93ecce9cedd43aa5782fbf23bb2ef8549b2119345a6f79": {
"source": {
"path": "FlowLogsTestStack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "2090a74d484bc155b48d7511b99e4921b8f55e488c3fe1500cffede0cdfd33b7.json",
"objectKey": "23955aa16c5d59106d93ecce9cedd43aa5782fbf23bb2ef8549b2119345a6f79.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Expand Up @@ -524,7 +524,6 @@
"Ref": "VPCB9E5F0B4"
},
"ResourceType": "VPC",
"TrafficType": "ALL",
"LogDestination": {
"Fn::GetAtt": [
"VPCFlowLogsS3BucketFB7DC2BE",
Expand All @@ -537,7 +536,8 @@
"Key": "Name",
"Value": "FlowLogsTestStack/VPC"
}
]
],
"TrafficType": "ALL"
}
},
"VPCFlowLogsS3KeyPrefixFlowLogB57F1746": {
Expand All @@ -547,7 +547,6 @@
"Ref": "VPCB9E5F0B4"
},
"ResourceType": "VPC",
"TrafficType": "ALL",
"LogDestination": {
"Fn::Join": [
"",
Expand All @@ -568,7 +567,8 @@
"Key": "Name",
"Value": "FlowLogsTestStack/VPC"
}
]
],
"TrafficType": "ALL"
}
},
"FlowLogsCWIAMRole017AD736": {
Expand Down Expand Up @@ -643,7 +643,6 @@
"Ref": "VPCB9E5F0B4"
},
"ResourceType": "VPC",
"TrafficType": "ALL",
"DeliverLogsPermissionArn": {
"Fn::GetAtt": [
"FlowLogsCWIAMRole017AD736",
Expand All @@ -653,7 +652,8 @@
"LogDestinationType": "cloud-watch-logs",
"LogGroupName": {
"Ref": "FlowLogsCWLogGroup0398E8F8"
}
},
"TrafficType": "ALL"
}
},
"Bucket83908E77": {
Expand Down Expand Up @@ -888,7 +888,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "bb426cfb5fed5237e5928f871893b243ddf86a591a592b558bd29f60e28bad9d.zip"
"S3Key": "33e2651435a0d472a75c1e033c9832b21321d9e56711926b04c5705e5f63874c.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down

0 comments on commit 90d9d1b

Please sign in to comment.