Skip to content

Commit

Permalink
Use policy in default behaviour as well for cf distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
gordon-klotho committed Mar 27, 2024
1 parent b12a0de commit 46d99ce
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 26 deletions.
6 changes: 2 additions & 4 deletions pkg/engine/testdata/cf_distribution.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ resources:
- PATCH
- POST
- PUT
CachePolicyId: 4135ea2d-6df8-44a3-9df3-4b5a84be39ad
CachedMethods:
- HEAD
- GET
DefaultTtl: 3600
ForwardedValues:
Cookies:
Forward: none
QueryString: true
MaxTtl: 86400
MinTtl: 0
OriginRequestPolicyId: b689b0a8-53d0-40ab-baf2-68738e2966ac
TargetOriginId: s3-bucket-3
ViewerProtocolPolicy: allow-all
Enabled: true
Expand Down
12 changes: 6 additions & 6 deletions pkg/engine/testdata/ecs_rds.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,42 +129,42 @@ resources:
Properties:
Annotations:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
Region: aws:region:region-0#Name
Type: metric
Width: 6
- Height: 6
Properties:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
Type: alarm
Width: 6
- Height: 6
Properties:
Annotations:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
Region: aws:region:region-0#Name
Type: metric
Width: 6
- Height: 6
Properties:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
Type: alarm
Width: 6
- Height: 6
Properties:
Annotations:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
Region: aws:region:region-0#Name
Type: metric
Width: 6
- Height: 6
Properties:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
Type: alarm
Width: 6
aws:ecr_image:ecs_service_0-ecs_service_0:
Expand Down
12 changes: 6 additions & 6 deletions pkg/engine/testdata/idempotent_constraints.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,42 +131,42 @@ resources:
Properties:
Annotations:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
Region: aws:region:region-0#Name
Type: metric
Width: 6
- Height: 6
Properties:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
Type: alarm
Width: 6
- Height: 6
Properties:
Annotations:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
Region: aws:region:region-0#Name
Type: metric
Width: 6
- Height: 6
Properties:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-CPUUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
Type: alarm
Width: 6
- Height: 6
Properties:
Annotations:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
Region: aws:region:region-0#Name
Type: metric
Width: 6
- Height: 6
Properties:
Alarms:
- aws:cloudwatch_alarm:ecs_service_0-MemoryUtilization#Arn
- aws:cloudwatch_alarm:ecs_service_0-RunningTaskCount#Arn
Type: alarm
Width: 6
aws:ecr_image:ecs_service_0-ecs_service_0:
Expand Down
6 changes: 2 additions & 4 deletions pkg/engine/testdata/static_site.expect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ resources:
- PATCH
- POST
- PUT
CachePolicyId: 4135ea2d-6df8-44a3-9df3-4b5a84be39ad
CachedMethods:
- HEAD
- GET
DefaultTtl: 3600
ForwardedValues:
Cookies:
Forward: none
QueryString: true
MaxTtl: 86400
MinTtl: 0
OriginRequestPolicyId: b689b0a8-53d0-40ab-baf2-68738e2966ac
TargetOriginId: s3-bucket-0
ViewerProtocolPolicy: allow-all
Enabled: true
Expand Down
8 changes: 2 additions & 6 deletions pkg/templates/aws/resources/cloudfront_distribution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,13 @@ properties:
default_value: 3600
CachePolicyId:
type: string
default_value: '4135ea2d-6df8-44a3-9df3-4b5a84be39ad' # Managed-CachingDisabled
OriginRequestPolicyId:
type: string
default_value: 'b689b0a8-53d0-40ab-baf2-68738e2966ac' # Managed-AllViewerExceptHostHeader
ViewerProtocolPolicy:
type: string
default_value: allow-all
CachePolicyId:
type: string
default_value: '4135ea2d-6df8-44a3-9df3-4b5a84be39ad' # Managed-CachingDisabled
OriginRequestPolicyId:
type: string
default_value: 'b689b0a8-53d0-40ab-baf2-68738e2966ac' # Managed-AllViewerExceptHostHeader
Restrictions:
type: map
properties:
Expand Down

0 comments on commit 46d99ce

Please sign in to comment.