Skip to content

Commit ee3a530

Browse files
feat(cfnspec): cloudformation spec v11.3.0 (#6598)
see CHANGELOG
1 parent db111af commit ee3a530

File tree

9 files changed

+477
-7
lines changed

9 files changed

+477
-7
lines changed

packages/@aws-cdk/cfnspec/CHANGELOG.md

+62
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,65 @@
1+
# CloudFormation Resource Specification v11.3.0
2+
3+
## New Resource Types
4+
5+
* AWS::CloudWatch::CompositeAlarm
6+
7+
## Attribute Changes
8+
9+
* AWS::AppMesh::Mesh MeshOwner (__added__)
10+
* AWS::AppMesh::Mesh ResourceOwner (__added__)
11+
* AWS::AppMesh::Route MeshOwner (__added__)
12+
* AWS::AppMesh::Route ResourceOwner (__added__)
13+
* AWS::AppMesh::VirtualNode MeshOwner (__added__)
14+
* AWS::AppMesh::VirtualNode ResourceOwner (__added__)
15+
* AWS::AppMesh::VirtualRouter MeshOwner (__added__)
16+
* AWS::AppMesh::VirtualRouter ResourceOwner (__added__)
17+
* AWS::AppMesh::VirtualService MeshOwner (__added__)
18+
* AWS::AppMesh::VirtualService ResourceOwner (__added__)
19+
20+
## Property Changes
21+
22+
23+
## Property Type Changes
24+
25+
* AWS::AppMesh::VirtualNode.BackendDefaults (__added__)
26+
* AWS::AppMesh::VirtualNode.ClientPolicy (__added__)
27+
* AWS::AppMesh::VirtualNode.ClientPolicyTls (__added__)
28+
* AWS::AppMesh::VirtualNode.ListenerTls (__added__)
29+
* AWS::AppMesh::VirtualNode.ListenerTlsAcmCertificate (__added__)
30+
* AWS::AppMesh::VirtualNode.ListenerTlsCertificate (__added__)
31+
* AWS::AppMesh::VirtualNode.ListenerTlsFileCertificate (__added__)
32+
* AWS::AppMesh::VirtualNode.TlsValidationContext (__added__)
33+
* AWS::AppMesh::VirtualNode.TlsValidationContextAcmTrust (__added__)
34+
* AWS::AppMesh::VirtualNode.TlsValidationContextFileTrust (__added__)
35+
* AWS::AppMesh::VirtualNode.TlsValidationContextTrust (__added__)
36+
* AWS::Greengrass::ResourceDefinition.ResourceDownloadOwnerSetting (__added__)
37+
* AWS::Greengrass::ResourceDefinitionVersion.ResourceDownloadOwnerSetting (__added__)
38+
* AWS::AppMesh::VirtualNode.Listener TLS (__added__)
39+
* AWS::AppMesh::VirtualNode.VirtualNodeSpec BackendDefaults (__added__)
40+
* AWS::AppMesh::VirtualNode.VirtualServiceBackend ClientPolicy (__added__)
41+
* AWS::Greengrass::ResourceDefinition.S3MachineLearningModelResourceData OwnerSetting (__added__)
42+
* AWS::Greengrass::ResourceDefinition.SageMakerMachineLearningModelResourceData OwnerSetting (__added__)
43+
* AWS::Greengrass::ResourceDefinitionVersion.S3MachineLearningModelResourceData OwnerSetting (__added__)
44+
* AWS::Greengrass::ResourceDefinitionVersion.SageMakerMachineLearningModelResourceData OwnerSetting (__added__)
45+
46+
# Serverless Application Model (SAM) Resource Specification v2016-10-31
47+
48+
## New Resource Types
49+
50+
51+
## Attribute Changes
52+
53+
54+
## Property Changes
55+
56+
57+
## Property Type Changes
58+
59+
* AWS::Serverless::Function.CloudWatchLogsEvent (__added__)
60+
* AWS::Serverless::Function.EventSource Properties.Types (__changed__)
61+
* Added CloudWatchLogsEvent
62+
163
# CloudFormation Resource Specification v11.1.0
264

365
## New Resource Types

packages/@aws-cdk/cfnspec/build-tools/build.ts

+24-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ async function main() {
2626
}
2727
}
2828

29-
detectScrutinyTypes(spec);
30-
replaceIncompleteTypes(spec);
29+
massageSpec(spec);
3130

3231
spec.Fingerprint = md5(JSON.stringify(normalize(spec)));
3332

@@ -36,6 +35,12 @@ async function main() {
3635
await fs.writeJson(path.join(outDir, 'specification.json'), spec, { spaces: 2 });
3736
}
3837

38+
export function massageSpec(spec: schema.Specification) {
39+
detectScrutinyTypes(spec);
40+
replaceIncompleteTypes(spec);
41+
dropTypelessAttributes(spec);
42+
}
43+
3944
function forEachSection(spec: schema.Specification, data: any, cb: (spec: any, fragment: any, path: string[]) => void) {
4045
cb(spec.PropertyTypes, data.PropertyTypes, ['PropertyTypes']);
4146
cb(spec.ResourceTypes, data.ResourceTypes, ['ResourceTypes']);
@@ -74,6 +79,23 @@ function replaceIncompleteTypes(spec: schema.Specification) {
7479
}
7580
}
7681

82+
/**
83+
* Drop Attributes specified with the different ResourceTypes that have
84+
* no type specified.
85+
*/
86+
function dropTypelessAttributes(spec: schema.Specification) {
87+
const resourceTypes = spec.ResourceTypes;
88+
Object.values(resourceTypes).forEach((resourceType) => {
89+
const attributes = resourceType.Attributes ?? {};
90+
Object.keys(attributes).forEach((attrKey) => {
91+
const attrVal = attributes[attrKey];
92+
if (Object.keys(attrVal).length === 0) {
93+
delete attributes[attrKey];
94+
}
95+
});
96+
});
97+
}
98+
7799
function merge(spec: any, fragment: any, jsonPath: string[]) {
78100
if (!fragment) { return; }
79101
for (const key of Object.keys(fragment)) {

packages/@aws-cdk/cfnspec/cfn.version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
11.1.0
1+
11.3.0

0 commit comments

Comments
 (0)