diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json new file mode 100644 index 0000000000000..7b81b6fbbc089 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json @@ -0,0 +1,19 @@ +{ + "version": "35.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "CF2RuntimeDefaultTestDeployAssertB25F4037.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/CF2RuntimeDefaultTestDeployAssertB25F4037.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/cdk.out new file mode 100644 index 0000000000000..c5cb2e5de6344 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"35.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ-distribution-function.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ-distribution-function.assets.json new file mode 100644 index 0000000000000..a164e0f9439f9 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ-distribution-function.assets.json @@ -0,0 +1,20 @@ +{ + "version": "35.0.0", + "files": { + "566341e5b3961d17fc2b60a44eba712f6e295016886f23ce22320d2c3a11f6bc": { + "source": { + "path": "integ-distribution-function.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-eu-west-1": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1", + "objectKey": "566341e5b3961d17fc2b60a44eba712f6e295016886f23ce22320d2c3a11f6bc.json", + "region": "eu-west-1", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-eu-west-1" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ-distribution-function.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ-distribution-function.template.json new file mode 100644 index 0000000000000..e8419a9b8ed44 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ-distribution-function.template.json @@ -0,0 +1,141 @@ +{ + "Resources": { + "FunctionRequest95528B2F": { + "Type": "AWS::CloudFront::Function", + "Properties": { + "AutoPublish": true, + "FunctionCode": "function handler(event) { return event.request }", + "FunctionConfig": { + "Comment": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB", + "Runtime": "cloudfront-js-1.0" + }, + "Name": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB" + } + }, + "FunctionResponse4EF2D1D3": { + "Type": "AWS::CloudFront::Function", + "Properties": { + "AutoPublish": true, + "FunctionCode": "function handler(event) { return event.response }", + "FunctionConfig": { + "Comment": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1", + "Runtime": "cloudfront-js-1.0" + }, + "Name": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1" + } + }, + "DistB3B78991": { + "Type": "AWS::CloudFront::Distribution", + "Properties": { + "DistributionConfig": { + "DefaultCacheBehavior": { + "CachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", + "Compress": true, + "FunctionAssociations": [ + { + "EventType": "viewer-request", + "FunctionARN": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "FunctionARN" + ] + } + }, + { + "EventType": "viewer-response", + "FunctionARN": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "FunctionARN" + ] + } + } + ], + "TargetOriginId": "integdistributionfunctionDistOrigin1D1E9DF17", + "ViewerProtocolPolicy": "allow-all" + }, + "Enabled": true, + "HttpVersion": "http2", + "IPV6Enabled": true, + "Origins": [ + { + "CustomOriginConfig": { + "OriginProtocolPolicy": "https-only" + }, + "DomainName": "www.example.com", + "Id": "integdistributionfunctionDistOrigin1D1E9DF17" + } + ] + } + } + } + }, + "Outputs": { + "RequestFunctionArn": { + "Value": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "FunctionARN" + ] + } + }, + "RequestFunctionStage": { + "Value": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "Stage" + ] + } + }, + "ResponseFunctionArn": { + "Value": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "FunctionARN" + ] + } + }, + "ResponseFunctionStage": { + "Value": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "Stage" + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "Default": "/cdk-bootstrap/hnb659fds/version", + "Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]" + } + }, + "Rules": { + "CheckBootstrapVersion": { + "Assertions": [ + { + "Assert": { + "Fn::Not": [ + { + "Fn::Contains": [ + [ + "1", + "2", + "3", + "4", + "5" + ], + { + "Ref": "BootstrapVersion" + } + ] + } + ] + }, + "AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ.json new file mode 100644 index 0000000000000..3f83a1ff45115 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/integ.json @@ -0,0 +1,12 @@ +{ + "version": "35.0.0", + "testCases": { + "CF2Runtime/DefaultTest": { + "stacks": [ + "integ-distribution-function" + ], + "assertionStack": "CF2Runtime/DefaultTest/DeployAssert", + "assertionStackName": "CF2RuntimeDefaultTestDeployAssertB25F4037" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/manifest.json new file mode 100644 index 0000000000000..cc6443b92a879 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/manifest.json @@ -0,0 +1,149 @@ +{ + "version": "35.0.0", + "artifacts": { + "integ-distribution-function.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "integ-distribution-function.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "integ-distribution-function": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/eu-west-1", + "properties": { + "templateFile": "integ-distribution-function.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-eu-west-1", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-eu-west-1", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-eu-west-1/566341e5b3961d17fc2b60a44eba712f6e295016886f23ce22320d2c3a11f6bc.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "integ-distribution-function.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-eu-west-1", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "integ-distribution-function.assets" + ], + "metadata": { + "/integ-distribution-function/FunctionRequest/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FunctionRequest95528B2F" + } + ], + "/integ-distribution-function/FunctionResponse/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "FunctionResponse4EF2D1D3" + } + ], + "/integ-distribution-function/Dist/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "DistB3B78991" + } + ], + "/integ-distribution-function/RequestFunctionArn": [ + { + "type": "aws:cdk:logicalId", + "data": "RequestFunctionArn" + } + ], + "/integ-distribution-function/RequestFunctionStage": [ + { + "type": "aws:cdk:logicalId", + "data": "RequestFunctionStage" + } + ], + "/integ-distribution-function/ResponseFunctionArn": [ + { + "type": "aws:cdk:logicalId", + "data": "ResponseFunctionArn" + } + ], + "/integ-distribution-function/ResponseFunctionStage": [ + { + "type": "aws:cdk:logicalId", + "data": "ResponseFunctionStage" + } + ], + "/integ-distribution-function/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/integ-distribution-function/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "integ-distribution-function" + }, + "CF2RuntimeDefaultTestDeployAssertB25F4037.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "CF2RuntimeDefaultTestDeployAssertB25F4037.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "CF2RuntimeDefaultTestDeployAssertB25F4037": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "CF2RuntimeDefaultTestDeployAssertB25F4037.template.json", + "terminationProtection": false, + "validateOnSynth": false, + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "CF2RuntimeDefaultTestDeployAssertB25F4037.assets" + ], + "lookupRole": { + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", + "requiresBootstrapStackVersion": 8, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "dependencies": [ + "CF2RuntimeDefaultTestDeployAssertB25F4037.assets" + ], + "metadata": { + "/CF2Runtime/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/CF2Runtime/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "CF2Runtime/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/tree.json new file mode 100644 index 0000000000000..988c2366038c6 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cloudfront/test/integ.distribution-function-runtime.ts.snapshot/tree.json @@ -0,0 +1,265 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "integ-distribution-function": { + "id": "integ-distribution-function", + "path": "integ-distribution-function", + "children": { + "FunctionRequest": { + "id": "FunctionRequest", + "path": "integ-distribution-function/FunctionRequest", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-distribution-function/FunctionRequest/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Function", + "aws:cdk:cloudformation:props": { + "autoPublish": true, + "functionCode": "function handler(event) { return event.request }", + "functionConfig": { + "comment": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB", + "runtime": "cloudfront-js-1.0" + }, + "name": "eu-west-1integdistributionfunctionFunctionRequest8E65DEEB" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.Function", + "version": "0.0.0" + } + }, + "FunctionResponse": { + "id": "FunctionResponse", + "path": "integ-distribution-function/FunctionResponse", + "children": { + "Resource": { + "id": "Resource", + "path": "integ-distribution-function/FunctionResponse/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Function", + "aws:cdk:cloudformation:props": { + "autoPublish": true, + "functionCode": "function handler(event) { return event.response }", + "functionConfig": { + "comment": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1", + "runtime": "cloudfront-js-1.0" + }, + "name": "eu-west-1integdistributionfunctionFunctionResponseDD4BADA1" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.CfnFunction", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.Function", + "version": "0.0.0" + } + }, + "Dist": { + "id": "Dist", + "path": "integ-distribution-function/Dist", + "children": { + "Origin1": { + "id": "Origin1", + "path": "integ-distribution-function/Dist/Origin1", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "Resource": { + "id": "Resource", + "path": "integ-distribution-function/Dist/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::CloudFront::Distribution", + "aws:cdk:cloudformation:props": { + "distributionConfig": { + "enabled": true, + "origins": [ + { + "domainName": "www.example.com", + "id": "integdistributionfunctionDistOrigin1D1E9DF17", + "customOriginConfig": { + "originProtocolPolicy": "https-only" + } + } + ], + "defaultCacheBehavior": { + "pathPattern": "*", + "targetOriginId": "integdistributionfunctionDistOrigin1D1E9DF17", + "cachePolicyId": "4135ea2d-6df8-44a3-9df3-4b5a84be39ad", + "compress": true, + "viewerProtocolPolicy": "allow-all", + "functionAssociations": [ + { + "functionArn": { + "Fn::GetAtt": [ + "FunctionRequest95528B2F", + "FunctionARN" + ] + }, + "eventType": "viewer-request" + }, + { + "functionArn": { + "Fn::GetAtt": [ + "FunctionResponse4EF2D1D3", + "FunctionARN" + ] + }, + "eventType": "viewer-response" + } + ] + }, + "httpVersion": "http2", + "ipv6Enabled": true + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.CfnDistribution", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_cloudfront.Distribution", + "version": "0.0.0" + } + }, + "RequestFunctionArn": { + "id": "RequestFunctionArn", + "path": "integ-distribution-function/RequestFunctionArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "RequestFunctionStage": { + "id": "RequestFunctionStage", + "path": "integ-distribution-function/RequestFunctionStage", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "ResponseFunctionArn": { + "id": "ResponseFunctionArn", + "path": "integ-distribution-function/ResponseFunctionArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "ResponseFunctionStage": { + "id": "ResponseFunctionStage", + "path": "integ-distribution-function/ResponseFunctionStage", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "integ-distribution-function/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "integ-distribution-function/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "CF2Runtime": { + "id": "CF2Runtime", + "path": "CF2Runtime", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "CF2Runtime/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "CF2Runtime/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "CF2Runtime/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "CF2Runtime/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "CF2Runtime/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file