Skip to content

Commit ac45f3f

Browse files
committed
Merge branch 'terraform-sync'
2 parents 82094b6 + 9070d36 commit ac45f3f

3 files changed

Lines changed: 35 additions & 33 deletions

File tree

deploy/infrastructure/prod/us-east-2/.terraform.lock.hcl

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deploy/infrastructure/prod/us-east-2/cloudfront.tf

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ locals {
33
indexstar_berg_origin_id = "${local.environment_name}_${local.region}_indexstar_berg"
44
indexstar_sf_origin_id = "${local.environment_name}_${local.region}_indexstar_sf"
55
indexstar_sf2_origin_id = "${local.environment_name}_${local.region}_indexstar_sf2"
6-
indexstar_primary = local.indexstar_sf_origin_id
6+
indexstar_primary = local.indexstar_sf2_origin_id
77
http_announce_origin_id = "${local.environment_name}_${local.region}_assigner"
88
cdn_subdomain = "cdn"
99
cf_log_bucket = "${local.environment_name}-${local.region}-cf-log"
@@ -126,7 +126,8 @@ resource "aws_cloudfront_distribution" "cdn" {
126126

127127
custom_error_response {
128128
error_code = 404
129-
error_caching_min_ttl = 300
129+
error_caching_min_ttl = 1200
130+
response_code = 0
130131
}
131132

132133
default_cache_behavior {
@@ -145,8 +146,8 @@ resource "aws_cloudfront_distribution" "cdn" {
145146
}
146147
compress = true
147148
viewer_protocol_policy = "redirect-to-https"
148-
min_ttl = 0
149-
default_ttl = 3600
149+
min_ttl = 1200
150+
default_ttl = 7200
150151
max_ttl = 86400
151152
}
152153

@@ -187,9 +188,9 @@ resource "aws_cloudfront_distribution" "cdn" {
187188
}
188189
compress = true
189190
viewer_protocol_policy = "redirect-to-https"
190-
min_ttl = 0
191-
default_ttl = 3600
192-
max_ttl = 86400
191+
min_ttl = 300
192+
default_ttl = 300
193+
max_ttl = 300
193194
}
194195

195196
ordered_cache_behavior {
@@ -207,8 +208,8 @@ resource "aws_cloudfront_distribution" "cdn" {
207208
}
208209
compress = true
209210
viewer_protocol_policy = "redirect-to-https"
210-
min_ttl = 0
211-
default_ttl = 3600
211+
min_ttl = 1200
212+
default_ttl = 7200
212213
max_ttl = 86400
213214
}
214215

@@ -230,8 +231,8 @@ resource "aws_cloudfront_distribution" "cdn" {
230231
}
231232
compress = true
232233
viewer_protocol_policy = "redirect-to-https"
233-
min_ttl = 0
234-
default_ttl = 3600
234+
min_ttl = 1200
235+
default_ttl = 7200
235236
max_ttl = 86400
236237
}
237238

@@ -245,17 +246,17 @@ resource "aws_cloudfront_distribution" "cdn" {
245246
query_string_cache_keys = [
246247
# See: https://github.com/ipni/specs/blob/main/IPNI_MH_SAMPLING.md#api
247248
"beacon",
248-
"max",
249249
"federation_epoch",
250+
"max",
250251
]
251252
cookies {
252253
forward = "none"
253254
}
254255
}
255256
compress = true
256257
viewer_protocol_policy = "redirect-to-https"
257-
min_ttl = 0
258-
default_ttl = 3600
258+
min_ttl = 1200
259+
default_ttl = 7200
259260
max_ttl = 86400
260261
}
261262

@@ -275,8 +276,8 @@ resource "aws_cloudfront_cache_policy" "lookup" {
275276

276277
# We have to set non-zero TTL values because otherwise CloudFront won't let
277278
# the query strings settings to be configured.
278-
min_ttl = 0
279-
default_ttl = 3600
279+
min_ttl = 1200
280+
default_ttl = 7200
280281
max_ttl = 86400
281282

282283
parameters_in_cache_key_and_forwarded_to_origin {
@@ -306,22 +307,6 @@ provider "aws" {
306307
region = "us-east-1"
307308
}
308309

309-
module "cdn_cert" {
310-
source = "registry.terraform.io/terraform-aws-modules/acm/aws"
311-
version = "4.3.2"
312-
313-
# Certificate must be in us-east-1 as dictated by CloudFront
314-
providers = {
315-
aws = aws.use1
316-
}
317-
318-
domain_name = aws_route53_zone.prod_external.name
319-
zone_id = aws_route53_zone.prod_external.zone_id
320-
subject_alternative_names = ["*.${aws_route53_zone.prod_external.name}"]
321-
322-
tags = local.tags
323-
}
324-
325310
module "records" {
326311
source = "registry.terraform.io/terraform-aws-modules/route53/aws//modules/records"
327312
version = "2.10.2"

deploy/infrastructure/prod/us-east-2/eks.tf

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module "eks" {
33
version = "18.20.2"
44

55
cluster_name = local.environment_name
6-
cluster_version = "1.23"
6+
cluster_version = "1.30"
77

88
cluster_endpoint_private_access = true
99
cluster_endpoint_public_access = true
@@ -40,6 +40,7 @@ module "eks" {
4040
effect = "NO_SCHEDULE"
4141
}
4242
}
43+
cluster_version = "1.25" # Note: temporary overwrite
4344
}
4445
prod-ue2a-r5n-2xl = {
4546
min_size = 0
@@ -54,6 +55,7 @@ module "eks" {
5455
effect = "NO_SCHEDULE"
5556
}
5657
}
58+
cluster_version = "1.25" # Note: temporary overwrite
5759
}
5860

5961

@@ -64,6 +66,7 @@ module "eks" {
6466
desired_size = 1
6567
instance_types = ["r6a.xlarge"]
6668
subnet_ids = [data.aws_subnet.ue2c2.id, data.aws_subnet.ue2c3.id]
69+
cluster_version = "1.25" # Note: temporary overwrite
6770
}
6871

6972
# General purpose node-group.
@@ -73,20 +76,23 @@ module "eks" {
7376
desired_size = 0
7477
subnet_ids = [data.aws_subnet.ue2a2.id, data.aws_subnet.ue2a3.id]
7578
instance_types = ["m4.xlarge"]
79+
cluster_version = "1.25" # Note: temporary overwrite
7680
}
7781
prod-ue2b-m4-xl = {
7882
min_size = 0
7983
max_size = 10
8084
desired_size = 0
8185
subnet_ids = [data.aws_subnet.ue2b2.id, data.aws_subnet.ue2b3.id]
8286
instance_types = ["m4.xlarge"]
87+
cluster_version = "1.25" # Note: temporary overwrite
8388
}
8489
prod-ue2c-m4-xl = {
8590
min_size = 0
8691
max_size = 10
8792
desired_size = 0
8893
subnet_ids = [data.aws_subnet.ue2c2.id, data.aws_subnet.ue2c3.id]
8994
instance_types = ["m4.xlarge"]
95+
cluster_version = "1.23" # Note: temporary overwrite
9096
}
9197

9298
prod-ue2a-c6a-8xl-2 = {
@@ -95,41 +101,47 @@ module "eks" {
95101
desired_size = 0
96102
instance_types = ["c6a.8xlarge"]
97103
subnet_ids = [data.aws_subnet.ue2a2.id, data.aws_subnet.ue2a3.id]
104+
cluster_version = "1.25" # Note: temporary overwrite
98105
}
99106
prod-ue2b-c6a-8xl-2 = {
100107
min_size = 0
101108
max_size = 5
102109
desired_size = 0
103110
instance_types = ["c6a.8xlarge"]
104111
subnet_ids = [data.aws_subnet.ue2b2.id, data.aws_subnet.ue2b3.id]
112+
cluster_version = "1.25" # Note: temporary overwrite
105113
}
106114
prod-ue2c-c6a-8xl-2 = {
107115
min_size = 0
108116
max_size = 5
109117
desired_size = 0
110118
instance_types = ["c6a.8xlarge"]
111119
subnet_ids = [data.aws_subnet.ue2c2.id, data.aws_subnet.ue2c3.id]
120+
cluster_version = "1.25" # Note: temporary overwrite
112121
}
113122
prod-ue2a-r6a-2xl = {
114123
min_size = 0
115124
max_size = 10
116125
desired_size = 0
117126
instance_types = ["r6a.2xlarge"]
118127
subnet_ids = [data.aws_subnet.ue2a1.id, data.aws_subnet.ue2a2.id, data.aws_subnet.ue2a3.id]
128+
cluster_version = "1.25" # Note: temporary overwrite
119129
}
120130
prod-ue2b-r6a-2xl = {
121131
min_size = 0
122132
max_size = 10
123133
desired_size = 0
124134
instance_types = ["r6a.2xlarge"]
125135
subnet_ids = [data.aws_subnet.ue2b1.id, data.aws_subnet.ue2b2.id, data.aws_subnet.ue2b3.id]
136+
cluster_version = "1.25" # Note: temporary overwrite
126137
}
127138
prod-ue2c-r6a-2xl = {
128139
min_size = 0
129140
max_size = 10
130141
desired_size = 0
131142
instance_types = ["r6a.2xlarge"]
132143
subnet_ids = [data.aws_subnet.ue2c1.id, data.aws_subnet.ue2c2.id, data.aws_subnet.ue2c3.id]
144+
cluster_version = "1.25" # Note: temporary overwrite
133145
}
134146
prod-ue2-c6a-8xl = {
135147
min_size = 0
@@ -141,6 +153,7 @@ module "eks" {
141153
data.aws_subnet.ue2b1.id, data.aws_subnet.ue2b2.id, data.aws_subnet.ue2b3.id,
142154
data.aws_subnet.ue2c1.id, data.aws_subnet.ue2c2.id, data.aws_subnet.ue2c3.id
143155
]
156+
cluster_version = "1.25" # Note: temporary overwrite
144157
}
145158
}
146159
}

0 commit comments

Comments
 (0)