Skip to content

Commit a7cab0a

Browse files
committed
fix: adjust for working tf plan
1 parent 25f34a2 commit a7cab0a

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

infra/cdn.tf

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
11
# TODO: Combine with fastly.tf so that we can layer the ngwaf stuff for testing
22
# terraform import fastly_service_vcl.cdn 1d1Bii4LcJ9joSaowpIdb3 && terraform show:
33
resource "fastly_service_vcl" "cdn" {
4-
active_version = 140
5-
cloned_version = 140
6-
comment = null
7-
default_host = null
84
default_ttl = 3600
9-
force_refresh = false
105
http3 = false
11-
id = "z5nOzklFYCXDAUiLeqvS25"
12-
imported = false
136
name = "test.python.org"
147
stale_if_error = false
158
stale_if_error_ttl = 43200
16-
version_comment = null
179

1810
acl {
19-
acl_id = "6Xx3rqKOY0FjQ2CuoS9D8I"
20-
force_destroy = false
2111
name = "Generated_by_IP_block_list"
12+
force_destroy = false
2213
}
2314

2415
backend {
@@ -153,9 +144,6 @@ resource "fastly_service_vcl" "cdn" {
153144
"text/plain",
154145
"text/xml",
155146
]
156-
extensions = [
157-
null,
158-
]
159147
name = "Default rules"
160148
}
161149

@@ -321,8 +309,8 @@ resource "fastly_service_vcl" "cdn" {
321309
format_version = 2
322310
message_type = "classic"
323311
compression_codec = "gzip"
324-
access_key = var.AWS_ACCESS_KEY_ID
325-
secret_key = var.AWS_SECRET_ACCESS_KEY
312+
s3_access_key = var.S3_ACCESS_KEY
313+
s3_secret_key = var.S3_SECRET_KEY
326314
}
327315

328316
logging_syslog {
@@ -351,7 +339,6 @@ resource "fastly_service_vcl" "cdn" {
351339
logger_type = "datadog"
352340
name = "test.python.org backends"
353341
penalty_box_duration = 2
354-
ratelimiter_id = "..." # TODO: create specific one for ngwaf test service? prod one is 5S7R6aG8KoT6QqtXFd1Nfk
355342
response_object_name = null
356343
rps_limit = 10
357344
uri_dictionary_name = null
@@ -379,7 +366,7 @@ resource "fastly_service_vcl" "cdn" {
379366
default_host = null
380367
force_miss = false
381368
force_ssl = true
382-
geo_headers = false # ! DEPRECATED
369+
# geo_headers = false # ! DEPRECATED
383370
hash_keys = null
384371
max_stale_age = 86400
385372
name = "Default cache policy"
@@ -393,7 +380,7 @@ resource "fastly_service_vcl" "cdn" {
393380
default_host = null
394381
force_miss = false
395382
force_ssl = false
396-
geo_headers = false # ! DEPRECATED
383+
# geo_headers = false # ! DEPRECATED
397384
hash_keys = null
398385
max_stale_age = 60
399386
name = "Force Pass"

infra/terraform.tfvars.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
AWS_ACCESS_KEY_ID = "NotARealKey"
22
AWS_SECRET_ACCESS_KEY = "NotARealKey"
3+
S3_ACCESS_KEY_ID = NotARealKey"
4+
S3_SECRET_KEY = "NotARealKey"
35

46
NGWAF_TOKEN = "NotARealKey"
57
FASTLY_API_KEY = "NotARealKey"

infra/variables.tf

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,17 @@ variable "AWS_SECRET_ACCESS_KEY" {
6565
sensitive = true
6666
}
6767

68+
variable "S3_ACCESS_KEY" {
69+
type = string
70+
description = "Access key for the S3 bucket."
71+
sensitive = true
72+
}
73+
variable "S3_SECRET_KEY" {
74+
type = string
75+
description = "Secret access key for the S3 bucket."
76+
sensitive = true
77+
}
78+
6879
variable "route53_zone_id" {
6980
type = string
7081
description = "The Route 53 hosted zone ID"

0 commit comments

Comments
 (0)