Skip to content

Commit

Permalink
Get value constraints from AWS registry types (#1867)
Browse files Browse the repository at this point in the history
* Get value constraints from registry types
* Eliminate unicode strings from being allowed for patterns
  • Loading branch information
kddejong committed Feb 11, 2021
1 parent e12a293 commit df9b214
Show file tree
Hide file tree
Showing 64 changed files with 162,002 additions and 26,656 deletions.
2 changes: 1 addition & 1 deletion scripts/update_specs_from_pricing.py
Expand Up @@ -218,7 +218,7 @@ def main():

outputs = update_outputs('Ec2InstanceType', get_results('AmazonEC2', ['Compute Instance', 'Compute Instance (bare metal)']), outputs)
outputs = update_outputs('AWS::AmazonMQ::Broker.HostInstanceType', get_mq_pricing(), outputs)
outputs = update_outputs('RdsInstanceType', get_rds_pricing(), outputs)
outputs = update_outputs('AWS::RDS::DBInstance.DBInstanceClass', get_rds_pricing(), outputs)
outputs = update_outputs('RedshiftInstanceType', get_results('AmazonRedshift', ['Compute Instance']), outputs)
outputs = update_outputs('DAXInstanceType', get_dax_pricing(), outputs)
outputs = update_outputs('DocumentDBInstanceClass', get_results('AmazonDocDB', ['Database Instance']), outputs)
Expand Down
3,790 changes: 3,284 additions & 506 deletions src/cfnlint/data/CloudSpecs/af-south-1.json

Large diffs are not rendered by default.

5,320 changes: 4,649 additions & 671 deletions src/cfnlint/data/CloudSpecs/ap-east-1.json

Large diffs are not rendered by default.

9,980 changes: 8,592 additions & 1,388 deletions src/cfnlint/data/CloudSpecs/ap-northeast-1.json

Large diffs are not rendered by default.

9,111 changes: 7,826 additions & 1,285 deletions src/cfnlint/data/CloudSpecs/ap-northeast-2.json

Large diffs are not rendered by default.

829 changes: 606 additions & 223 deletions src/cfnlint/data/CloudSpecs/ap-northeast-3.json

Large diffs are not rendered by default.

9,281 changes: 7,972 additions & 1,309 deletions src/cfnlint/data/CloudSpecs/ap-south-1.json

Large diffs are not rendered by default.

10,271 changes: 8,854 additions & 1,417 deletions src/cfnlint/data/CloudSpecs/ap-southeast-1.json

Large diffs are not rendered by default.

11,866 changes: 10,299 additions & 1,567 deletions src/cfnlint/data/CloudSpecs/ap-southeast-2.json

Large diffs are not rendered by default.

8,542 changes: 7,310 additions & 1,232 deletions src/cfnlint/data/CloudSpecs/ca-central-1.json

Large diffs are not rendered by default.

2,276 changes: 1,915 additions & 361 deletions src/cfnlint/data/CloudSpecs/cn-north-1.json

Large diffs are not rendered by default.

2,193 changes: 1,844 additions & 349 deletions src/cfnlint/data/CloudSpecs/cn-northwest-1.json

Large diffs are not rendered by default.

10,366 changes: 8,942 additions & 1,424 deletions src/cfnlint/data/CloudSpecs/eu-central-1.json

Large diffs are not rendered by default.

7,093 changes: 5,998 additions & 1,095 deletions src/cfnlint/data/CloudSpecs/eu-north-1.json

Large diffs are not rendered by default.

3,731 changes: 3,220 additions & 511 deletions src/cfnlint/data/CloudSpecs/eu-south-1.json

Large diffs are not rendered by default.

12,282 changes: 10,668 additions & 1,614 deletions src/cfnlint/data/CloudSpecs/eu-west-1.json

Large diffs are not rendered by default.

9,531 changes: 8,204 additions & 1,327 deletions src/cfnlint/data/CloudSpecs/eu-west-2.json

Large diffs are not rendered by default.

8,134 changes: 6,949 additions & 1,185 deletions src/cfnlint/data/CloudSpecs/eu-west-3.json

Large diffs are not rendered by default.

5,727 changes: 4,764 additions & 963 deletions src/cfnlint/data/CloudSpecs/me-south-1.json

Large diffs are not rendered by default.

8,827 changes: 7,568 additions & 1,259 deletions src/cfnlint/data/CloudSpecs/sa-east-1.json

Large diffs are not rendered by default.

12,422 changes: 10,786 additions & 1,636 deletions src/cfnlint/data/CloudSpecs/us-east-1.json

Large diffs are not rendered by default.

9,582 changes: 8,238 additions & 1,344 deletions src/cfnlint/data/CloudSpecs/us-east-2.json

Large diffs are not rendered by default.

2,451 changes: 2,068 additions & 383 deletions src/cfnlint/data/CloudSpecs/us-gov-east-1.json

Large diffs are not rendered by default.

3,550 changes: 3,034 additions & 516 deletions src/cfnlint/data/CloudSpecs/us-gov-west-1.json

Large diffs are not rendered by default.

8,633 changes: 7,393 additions & 1,240 deletions src/cfnlint/data/CloudSpecs/us-west-1.json

Large diffs are not rendered by default.

12,105 changes: 10,506 additions & 1,599 deletions src/cfnlint/data/CloudSpecs/us-west-2.json

Large diffs are not rendered by default.

Expand Up @@ -94,7 +94,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m5.12xlarge",
"db.m5.16xlarge",
Expand Down
49 changes: 1 addition & 48 deletions src/cfnlint/data/ExtendedSpecs/all/03_value_types.json
Expand Up @@ -248,15 +248,6 @@
"Ec2FleetType": {
"botocore": "ec2/2016-11-15/FleetType"
},
"Ec2FlowLogDestinationType": {
"botocore": "ec2/2016-11-15/LogDestinationType"
},
"Ec2FlowLogResourceType": {
"botocore": "ec2/2016-11-15/FlowLogsResourceType"
},
"Ec2FlowLogTrafficType": {
"botocore": "ec2/2016-11-15/TrafficType"
},
"Ec2HostAutoPlacement": {
"botocore": "ec2/2016-11-15/AutoPlacement"
},
Expand All @@ -270,15 +261,9 @@
"Ec2Tenancy": {
"botocore": "ec2/2016-11-15/Tenancy"
},
"EcsLaunchType": {
"botocore": "ecs/2014-11-13/LaunchType"
},
"EcsNetworkMode": {
"botocore": "ecs/2014-11-13/NetworkMode"
},
"EcsSchedulingStrategy": {
"botocore": "ecs/2014-11-13/SchedulingStrategy"
},
"EcsTaskDefinitionProxyType": {
"botocore": "ecs/2014-11-13/ProxyConfigurationType"
},
Expand Down Expand Up @@ -320,18 +305,7 @@
]
}
},
"KmsKey.Id": {
"GetAtt": {},
"Ref": {
"Parameters": [
"String"
],
"Resources": [
"AWS::KMS::Key"
]
}
},
"KmsKey.IdOrArn": {
"AWS::KMS::Alias.TargetKeyId": {
"GetAtt": {
"AWS::KMS::Key": "Arn"
},
Expand Down Expand Up @@ -482,13 +456,6 @@
"60"
]
},
"RdsInstanceType": {
"Ref": {
"Parameters": [
"String"
]
}
},
"RecordSetFailover": {
"botocore": "route53/2013-04-01/ResourceRecordSetFailover"
},
Expand Down Expand Up @@ -559,12 +526,6 @@
]
}
},
"Route53HealthCheckConfigHealthStatus": {
"botocore": "route53/2013-04-01/InsufficientDataHealthStatus"
},
"Route53HealthCheckConfigType": {
"botocore": "route53/2013-04-01/HealthCheckType"
},
"Route53ResolverEndpointDirection": {
"botocore": "route53resolver/2018-04-01/ResolverEndpointDirection"
},
Expand Down Expand Up @@ -664,14 +625,6 @@
]
}
},
"String": {
"GetAtt": {},
"Ref": {
"Parameters": [
"String"
]
}
},
"SubnetId": {
"GetAtt": {},
"Ref": {
Expand Down
17 changes: 0 additions & 17 deletions src/cfnlint/data/ExtendedSpecs/all/03_value_types/aws_wafv2.json

This file was deleted.

56 changes: 0 additions & 56 deletions src/cfnlint/data/ExtendedSpecs/all/04_property_values.json
Expand Up @@ -237,20 +237,6 @@
"ValueType": "EbsVolumeType"
}
},
{
"op": "add",
"path": "/PropertyTypes/AWS::Route53::HealthCheck.HealthCheckConfig/Properties/InsufficientDataHealthStatus/Value",
"value": {
"ValueType": "Route53HealthCheckConfigHealthStatus"
}
},
{
"op": "add",
"path": "/PropertyTypes/AWS::Route53::HealthCheck.HealthCheckConfig/Properties/Type/Value",
"value": {
"ValueType": "Route53HealthCheckConfigType"
}
},
{
"op": "add",
"path": "/PropertyTypes/AWS::S3::Bucket.AccelerateConfiguration/Properties/AccelerationStatus/Value",
Expand Down Expand Up @@ -682,27 +668,6 @@
"ValueType": "Ec2FleetType"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::EC2::FlowLog/Properties/LogDestinationType/Value",
"value": {
"ValueType": "Ec2FlowLogDestinationType"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::EC2::FlowLog/Properties/ResourceType/Value",
"value": {
"ValueType": "Ec2FlowLogResourceType"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::EC2::FlowLog/Properties/TrafficType/Value",
"value": {
"ValueType": "Ec2FlowLogTrafficType"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::EC2::Host/Properties/AvailabilityZone/Value",
Expand Down Expand Up @@ -808,20 +773,6 @@
"ValueType": "PlacementTenancy"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::ECS::Service/Properties/LaunchType/Value",
"value": {
"ValueType": "EcsLaunchType"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::ECS::Service/Properties/SchedulingStrategy/Value",
"value": {
"ValueType": "EcsSchedulingStrategy"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::ECS::TaskDefinition/Properties/NetworkMode/Value",
Expand Down Expand Up @@ -923,13 +874,6 @@
"ValueType": "TargetGroupHealthyThresholdCount"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::KMS::Alias/Properties/TargetKeyId/Value",
"value": {
"ValueType": "KmsKey.IdOrArn"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::Lambda::Function/Properties/Runtime/Value",
Expand Down
Expand Up @@ -76,5 +76,12 @@
"value": {
"ValueType": "AWS::Lambda::EventSourceMapping.EventSourceArn"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::Lambda::EventSourceMapping/Properties/MaximumBatchingWindowInSeconds/Value",
"value": {
"ValueType": "AWS::Lambda::EventSourceMapping.MaximumBatchingWindowInSeconds"
}
}
]
Expand Up @@ -20,6 +20,13 @@
"ValueType": "AWS::RDS::DBInstance.PromotionTier"
}
},
{
"op": "add",
"path": "/ResourceTypes/AWS::RDS::DBInstance/Properties/DBInstanceClass/Value",
"value": {
"ValueType": "AWS::RDS::DBInstance.DBInstanceClass"
}
},
{
"op": "add",
"path": "/PropertyTypes/AWS::RDS::DBSecurityGroup.Ingress/Properties/CIDRIP/Value",
Expand Down

This file was deleted.

Expand Up @@ -19,5 +19,10 @@
"value": [
"stream.standard.large"
]
},
{
"op": "add",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass",
"value": {}
}
]
Expand Up @@ -150,7 +150,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m5.12xlarge",
"db.m5.16xlarge",
Expand Down
Expand Up @@ -343,7 +343,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m1.large",
"db.m1.medium",
Expand Down
Expand Up @@ -263,7 +263,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m4.10xlarge",
"db.m4.16xlarge",
Expand Down
Expand Up @@ -121,7 +121,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m4.10xlarge",
"db.m4.16xlarge",
Expand Down
Expand Up @@ -258,7 +258,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m4.10xlarge",
"db.m4.16xlarge",
Expand Down
Expand Up @@ -367,7 +367,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m1.large",
"db.m1.medium",
Expand Down
Expand Up @@ -326,7 +326,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m1.large",
"db.m1.medium",
Expand Down
Expand Up @@ -236,7 +236,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m4.10xlarge",
"db.m4.16xlarge",
Expand Down
Expand Up @@ -186,7 +186,7 @@
},
{
"op": "add",
"path": "/ValueTypes/RdsInstanceType/AllowedValues",
"path": "/ValueTypes/AWS::RDS::DBInstance.DBInstanceClass/AllowedValues",
"value": [
"db.m1.small",
"db.m3.2xlarge",
Expand Down

0 comments on commit df9b214

Please sign in to comment.