Skip to content

Commit

Permalink
feat(cloudfront): add attachWebAclId method for Distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k committed Jun 17, 2024
1 parent 0fa3b1e commit 0900148
Show file tree
Hide file tree
Showing 13 changed files with 591 additions and 9 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"Resources": {
"WebAcl": {
"Type": "AWS::WAFv2::WebACL",
"Properties": {
"DefaultAction": {
"Allow": {}
},
"Scope": "CLOUDFRONT",
"VisibilityConfig": {
"CloudWatchMetricsEnabled": false,
"MetricName": "webAclMetric",
"SampledRequestsEnabled": false
}
}
},
"Distribution830FAC52": {
"Type": "AWS::CloudFront::Distribution",
"Properties": {
"DistributionConfig": {
"DefaultCacheBehavior": {
"CachePolicyId": "658327ea-f89d-4fab-a63d-7e88639e58f6",
"Compress": true,
"TargetOriginId": "awscdkcloudfrontwithwebaclDistributionOrigin11CAC3663",
"ViewerProtocolPolicy": "allow-all"
},
"Enabled": true,
"HttpVersion": "http2",
"IPV6Enabled": true,
"Origins": [
{
"CustomOriginConfig": {
"OriginProtocolPolicy": "https-only"
},
"DomainName": "www.example.com",
"Id": "awscdkcloudfrontwithwebaclDistributionOrigin11CAC3663"
}
],
"WebACLId": {
"Fn::GetAtt": [
"WebAcl",
"Arn"
]
}
}
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"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."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0900148

Please sign in to comment.