Skip to content

Commit

Permalink
feat(cfnspec): cloudformation spec v81.1.0 (aws#21307)
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-cdk-automation authored and mrgrain committed Jul 28, 2022
1 parent 372acc2 commit ff61389
Show file tree
Hide file tree
Showing 198 changed files with 452 additions and 222 deletions.
37 changes: 17 additions & 20 deletions packages/@aws-cdk/aws-cloudfront/lib/web-distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -818,18 +818,6 @@ export class CloudFrontWebDistribution extends cdk.Resource implements IDistribu
? `${props.comment.slice(0, 128 - 3)}...`
: props.comment;

let distributionConfig: CfnDistribution.DistributionConfigProperty = {
comment: trimmedComment,
enabled: props.enabled ?? true,
defaultRootObject: props.defaultRootObject ?? 'index.html',
httpVersion: props.httpVersion || HttpVersion.HTTP2,
priceClass: props.priceClass || PriceClass.PRICE_CLASS_100,
ipv6Enabled: props.enableIpV6 ?? true,
// eslint-disable-next-line max-len
customErrorResponses: props.errorConfigurations, // TODO: validation : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcachingminttl
webAclId: props.webACLId,
};

const behaviors: BehaviorWithOrigin[] = [];

const origins: CfnDistribution.OriginProperty[] = [];
Expand Down Expand Up @@ -892,19 +880,12 @@ export class CloudFrontWebDistribution extends cdk.Resource implements IDistribu
quantity: originGroups.length,
}
: undefined;
distributionConfig = {
...distributionConfig,
origins,
originGroups: originGroupsDistConfig,
};

const defaultBehaviors = behaviors.filter(behavior => behavior.isDefaultBehavior);
if (defaultBehaviors.length !== 1) {
throw new Error('There can only be one default behavior across all sources. [ One default behavior per distribution ].');
}

distributionConfig = { ...distributionConfig, defaultCacheBehavior: this.toBehavior(defaultBehaviors[0], props.viewerProtocolPolicy) };

const otherBehaviors: CfnDistribution.CacheBehaviorProperty[] = [];
for (const behavior of behaviors.filter(b => !b.isDefaultBehavior)) {
if (!behavior.pathPattern) {
Expand All @@ -913,7 +894,23 @@ export class CloudFrontWebDistribution extends cdk.Resource implements IDistribu
otherBehaviors.push(this.toBehavior(behavior, props.viewerProtocolPolicy) as CfnDistribution.CacheBehaviorProperty);
}

distributionConfig = { ...distributionConfig, cacheBehaviors: otherBehaviors.length > 0 ? otherBehaviors : undefined };
let distributionConfig: CfnDistribution.DistributionConfigProperty = {
comment: trimmedComment,
enabled: props.enabled ?? true,
defaultRootObject: props.defaultRootObject ?? 'index.html',
httpVersion: props.httpVersion || HttpVersion.HTTP2,
priceClass: props.priceClass || PriceClass.PRICE_CLASS_100,
ipv6Enabled: props.enableIpV6 ?? true,
// eslint-disable-next-line max-len
customErrorResponses: props.errorConfigurations, // TODO: validation : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-customerrorresponse.html#cfn-cloudfront-distribution-customerrorresponse-errorcachingminttl
webAclId: props.webACLId,

origins,
originGroups: originGroupsDistConfig,

defaultCacheBehavior: this.toBehavior(defaultBehaviors[0], props.viewerProtocolPolicy),
cacheBehaviors: otherBehaviors.length > 0 ? otherBehaviors : undefined,
};

if (props.aliasConfiguration && props.viewerCertificate) {
throw new Error([
Expand Down
59 changes: 59 additions & 0 deletions packages/@aws-cdk/cfnspec/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
# CloudFormation Resource Specification v81.1.0

## New Resource Types

* AWS::Evidently::Segment

## Attribute Changes

* AWS::ApiGateway::DocumentationPart DocumentationPartId (__added__)
* AWS::IoT::Policy Id (__added__)

## Property Changes

* AWS::CloudWatch::CompositeAlarm ActionsSuppressor (__added__)
* AWS::CloudWatch::CompositeAlarm ActionsSuppressorExtensionPeriod (__added__)
* AWS::CloudWatch::CompositeAlarm ActionsSuppressorWaitPeriod (__added__)
* AWS::EC2::Host InstanceFamily (__added__)
* AWS::EC2::Host OutpostArn (__added__)
* AWS::EC2::Host InstanceType.Required (__changed__)
* Old: true
* New: false
* AWS::EC2::VPCEndpointService ContributorInsightsEnabled (__added__)
* AWS::GuardDuty::Detector Tags (__added__)
* AWS::GuardDuty::Filter Tags (__added__)
* AWS::GuardDuty::IPSet Tags (__added__)
* AWS::GuardDuty::ThreatIntelSet Tags (__added__)
* AWS::IoT::Policy PolicyDocument.UpdateType (__changed__)
* Old: Immutable
* New: Mutable
* AWS::Location::GeofenceCollection KmsKeyId.UpdateType (__changed__)
* Old: Mutable
* New: Immutable
* AWS::Location::GeofenceCollection PricingPlanDataSource.UpdateType (__changed__)
* Old: Immutable
* New: Mutable
* AWS::Location::Tracker PricingPlanDataSource.UpdateType (__changed__)
* Old: Immutable
* New: Mutable
* AWS::SSO::PermissionSet CustomerManagedPolicyReferences (__added__)
* AWS::SSO::PermissionSet PermissionsBoundary (__added__)

## Property Type Changes

* AWS::SSO::PermissionSet.CustomerManagedPolicyReference (__added__)
* AWS::SSO::PermissionSet.PermissionsBoundary (__added__)
* AWS::Transfer::Server.As2Transport (__added__)
* AWS::AppFlow::Flow.ScheduledTriggerProperties FirstExecutionFrom (__added__)
* AWS::CloudFront::Distribution.DistributionConfig DefaultCacheBehavior.Required (__changed__)
* Old: false
* New: true
* AWS::Transfer::Server.ProtocolDetails As2Transports (__added__)

## Unapplied changes

* AWS::ConnectCampaigns is at 0.0.0
* AWS::Rekognition is at 68.0.0
* AWS::RolesAnywhere is at 0.0.0
* AWS::SageMaker is at 72.0.0

# CloudFormation Resource Specification v81.0.0

## New Resource Types
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cfnspec/cfn.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
81.0.0
81.1.0
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
}
}
},
"ResourceSpecificationVersion": "81.0.0",
"ResourceSpecificationVersion": "81.1.0",
"ResourceTypes": {
"AWS::ConnectCampaigns::Campaign": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
}
}
},
"ResourceSpecificationVersion": "81.0.0",
"ResourceSpecificationVersion": "81.1.0",
"ResourceTypes": {
"AWS::Rekognition::Collection": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rolesanywhere-trustanchor-sourcedata.html"
}
},
"ResourceSpecificationVersion": "81.0.0",
"ResourceSpecificationVersion": "81.1.0",
"ResourceTypes": {
"AWS::RolesAnywhere::CRL": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3531,7 +3531,7 @@
}
}
},
"ResourceSpecificationVersion": "81.0.0",
"ResourceSpecificationVersion": "81.1.0",
"ResourceTypes": {
"AWS::SageMaker::App": {
"Attributes": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::ACMPCA::Certificate.ApiPassthrough": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-acmpca-certificate-apipassthrough.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {},
"ResourceTypes": {
"AWS::APS::RuleGroupsNamespace": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AccessAnalyzer::Analyzer.ArchiveRule": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-accessanalyzer-analyzer-archiverule.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AmazonMQ::Broker.ConfigurationId": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amazonmq-broker-configurationid.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::Amplify::App.AutoBranchCreationConfig": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplify-app-autobranchcreationconfig.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AmplifyUIBuilder::Component.ActionParameters": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-amplifyuibuilder-component-actionparameters.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::ApiGateway::ApiKey.StageKey": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-apikey-stagekey.html",
Expand Down Expand Up @@ -977,6 +977,11 @@
}
},
"AWS::ApiGateway::DocumentationPart": {
"Attributes": {
"DocumentationPartId": {
"PrimitiveType": "String"
}
},
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-apigateway-documentationpart.html",
"Properties": {
"Location": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::ApiGatewayV2::Api.BodyS3Location": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigatewayv2-api-bodys3location.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AppConfig::Application.Tags": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appconfig-application-tags.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AppFlow::ConnectorProfile.AmplitudeConnectorProfileCredentials": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-connectorprofile-amplitudeconnectorprofilecredentials.html",
Expand Down Expand Up @@ -1646,6 +1646,12 @@
"Required": false,
"UpdateType": "Mutable"
},
"FirstExecutionFrom": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-scheduledtriggerproperties.html#cfn-appflow-flow-scheduledtriggerproperties-firstexecutionfrom",
"PrimitiveType": "Double",
"Required": false,
"UpdateType": "Mutable"
},
"FlowErrorDeactivationThreshold": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appflow-flow-scheduledtriggerproperties.html#cfn-appflow-flow-scheduledtriggerproperties-flowerrordeactivationthreshold",
"PrimitiveType": "Integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AppIntegrations::DataIntegration.ScheduleConfig": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appintegrations-dataintegration-scheduleconfig.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AppMesh::GatewayRoute.GatewayRouteHostnameMatch": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appmesh-gatewayroute-gatewayroutehostnamematch.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AppRunner::ObservabilityConfiguration.TraceConfiguration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apprunner-observabilityconfiguration-traceconfiguration.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AppStream::AppBlock.S3Location": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appstream-appblock-s3location.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AppSync::DataSource.AuthorizationConfig": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-appsync-datasource-authorizationconfig.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::ApplicationAutoScaling::ScalableTarget.ScalableTargetAction": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalabletarget-scalabletargetaction.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::ApplicationInsights::Application.Alarm": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationinsights-application-alarm.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::Athena::WorkGroup.EncryptionConfiguration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-athena-workgroup-encryptionconfiguration.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AuditManager::Assessment.AWSAccount": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-auditmanager-assessment-awsaccount.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AutoScaling::AutoScalingGroup.AcceleratorCountRequest": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscaling-autoscalinggroup-acceleratorcountrequest.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::AutoScalingPlans::ScalingPlan.ApplicationSource": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-autoscalingplans-scalingplan-applicationsource.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::Backup::BackupPlan.AdvancedBackupSettingResourceType": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-backup-backupplan-advancedbackupsettingresourcetype.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::Batch::ComputeEnvironment.ComputeResources": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::BillingConductor::BillingGroup.AccountGrouping": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-billingconductor-billinggroup-accountgrouping.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::Budgets::Budget.BudgetData": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-budgets-budget-budgetdata.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::CE::AnomalyMonitor.ResourceTag": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ce-anomalymonitor-resourcetag.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {},
"ResourceTypes": {
"AWS::CUR::ReportDefinition": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::Cassandra::Table.BillingMode": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cassandra-table-billingmode.html",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$version": "81.0.0",
"$version": "81.1.0",
"PropertyTypes": {
"AWS::CertificateManager::Account.ExpiryEventsConfiguration": {
"Documentation": "http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-certificatemanager-account-expiryeventsconfiguration.html",
Expand Down
Loading

0 comments on commit ff61389

Please sign in to comment.