File tree Expand file tree Collapse file tree 5 files changed +12
-14
lines changed
crates-io-staging/crates-io Expand file tree Collapse file tree 5 files changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ inputs = {
2828
2929 static_cloudfront_weight = 0
3030 static_fastly_weight = 255
31+ index_cloudfront_weight = 255
3132 index_fastly_weight = 0
3233
3334 cdn_log_event_queue_arn = " arn:aws:sqs:us-west-1:365596307002:cdn-log-event-queue"
Original file line number Diff line number Diff line change 1- 2427cd75d8a03281142d155f4b3ce0edccc40468
1+ cde68e691d767d64d44c1ee03818264d19412cd9
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ inputs = {
2727
2828 static_cloudfront_weight = 0
2929 static_fastly_weight = 100
30+ index_cloudfront_weight = 100
3031 index_fastly_weight = 0
3132
3233 cdn_log_event_queue_arn = " arn:aws:sqs:us-west-1:359172468976:cdn-log-event-queue"
Original file line number Diff line number Diff line change @@ -82,11 +82,10 @@ variable "static_fastly_weight" {
8282 type = number
8383}
8484
85- # TODO: uncomment
86- # variable "index_cloudfront_weight" {
87- # description = "Weight of the traffic for index.crates.io that is routed through CloudFront"
88- # type = number
89- # }
85+ variable "index_cloudfront_weight" {
86+ description = " Weight of the traffic for index.crates.io that is routed through CloudFront"
87+ type = number
88+ }
9089
9190variable "index_fastly_weight" {
9291 description = " Weight of the traffic for index.crates.io that is routed through Fastly"
Original file line number Diff line number Diff line change @@ -96,14 +96,11 @@ resource "aws_route53_record" "index" {
9696 name = var. index_domain_name
9797 type = " CNAME"
9898 ttl = 300
99- records = [aws_cloudfront_distribution . index . domain_name ]
100- # TODO replace the records
101- # records = [aws_route53_record.cloudfront_index_domain.fqdn]
99+ records = [aws_route53_record . cloudfront_index_domain . fqdn ]
102100
103- # TODO: uncomment
104- # weighted_routing_policy {
105- # weight = var.index_cloudfront_weight
106- # }
101+ weighted_routing_policy {
102+ weight = var. index_cloudfront_weight
103+ }
107104
108- # set_identifier = "cloudfront"
105+ set_identifier = " cloudfront"
109106}
You can’t perform that action at this time.
0 commit comments