Skip to content

Commit 087da1e

Browse files
committed
feat: add backend configs
1 parent 15a544e commit 087da1e

File tree

2 files changed

+33
-8
lines changed

2 files changed

+33
-8
lines changed

infra/cdn.tf

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,37 @@ resource "fastly_service_vcl" "cdn" {
2121
name = "Generated_by_IP_block_list"
2222
}
2323

24-
backend { # TODO: add cabo stuffs
25-
# At least one attribute in this block is (or was) sensitive,
26-
# so its contents will not be displayed.
24+
backend {
25+
name = "cabotage"
26+
address = "test-pythondotorg.ingress.us-east-2.psfhosted.computer"
27+
port = 443
28+
shield = "iad-va-us"
29+
auto_loadbalance = false
30+
ssl_check_cert = true
31+
ssl_cert_hostname = "test-pythondotorg.ingress.us-east-2.psfhosted.computer"
32+
ssl_sni_hostname = "test-pythondotorg.ingress.us-east-2.psfhosted.computer"
33+
weight = 100
34+
max_conn = 200
35+
connect_timeout = 1000
36+
first_byte_timeout = 30000
37+
between_bytes_timeout = 10000
2738
}
28-
backend { # TODO: unsure what this onewas, i think maybe lb?
29-
# At least one attribute in this block is (or was) sensitive,
30-
# so its contents will not be displayed.
39+
40+
backend {
41+
name = "loadbalancer"
42+
address = "lb.nyc1.psf.io"
43+
shield = "iad-va-us"
44+
healthcheck = "HAProxy Status"
45+
auto_loadbalance = false
46+
ssl_check_cert = true
47+
ssl_cert_hostname = "lb.psf.io"
48+
ssl_sni_hostname = "lb.psf.io"
49+
ssl_ca_cert = "" # TODO(@ee)
50+
weight = 100
51+
max_conn = 200
52+
connect_timeout = 1000
53+
first_byte_timeout = 15000
54+
between_bytes_timeout = 10000
3155
}
3256

3357
cache_setting {
@@ -327,7 +351,7 @@ resource "fastly_service_vcl" "cdn" {
327351
logger_type = "datadog"
328352
name = "test.python.org backends"
329353
penalty_box_duration = 2
330-
ratelimiter_id = "..." # TODO: create one for ngwaf test service
354+
ratelimiter_id = "..." # TODO: create specific one for ngwaf test service? prod one is 5S7R6aG8KoT6QqtXFd1Nfk
331355
response_object_name = null
332356
rps_limit = 10
333357
uri_dictionary_name = null

infra/terraform.tfvars.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ AWS_SECRET_ACCESS_KEY = "NotARealKey"
33

44
NGWAF_TOKEN = "NotARealKey"
55
FASTLY_API_KEY = "NotARealKey"
6-
FASTLY_HEADER_TOKEN = ""
6+
FASTLY_HEADER_TOKEN = "NotARealKey"
7+
DATADOG_API_KEY = "NotARealKey"

0 commit comments

Comments
 (0)