Skip to content

Commit b47f458

Browse files
SirCortlycortlyons
andauthored
update webhook url to fix broken e2e tests (#44)
Co-authored-by: cortlyons <cortlyons@cloudflare.com>
1 parent 5b86591 commit b47f458

File tree

4 files changed

+50
-50
lines changed

4 files changed

+50
-50
lines changed

integration/v4_to_v5/testdata/notification_policy_webhooks/expected/notification_policy_webhooks.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ variable "cloudflare_zone_id" {
1111
type = string
1212
}
1313

14-
# Use pre-existing webhook endpoint worker
15-
# Worker URL: https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/
16-
# This worker responds with 200 OK to all requests for webhook validation
14+
# Use Cloudflare trace endpoint for webhook testing
15+
# URL: https://www.cloudflare.com/cdn-cgi/trace
16+
# This endpoint responds with 200 OK to all requests for webhook validation
1717

1818
# ========================================
1919
# Locals
2020
# ========================================
2121
locals {
2222
common_account = var.cloudflare_account_id
2323
name_prefix = "test-integration"
24-
webhook_base_url = "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev"
24+
webhook_base_url = "https://www.cloudflare.com/cdn-cgi/trace"
2525
enable_backup = true
2626
enable_test = false
2727
}
@@ -34,14 +34,14 @@ locals {
3434
resource "cloudflare_notification_policy_webhooks" "basic_webhook" {
3535
account_id = var.cloudflare_account_id
3636
name = "basic-webhook"
37-
url = "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/basic"
37+
url = "https://www.cloudflare.com/cdn-cgi/trace/basic"
3838
}
3939

4040
# Test Case 2: Full webhook with all fields
4141
resource "cloudflare_notification_policy_webhooks" "full_webhook" {
4242
account_id = var.cloudflare_account_id
4343
name = "production-webhook"
44-
url = "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/full"
44+
url = "https://www.cloudflare.com/cdn-cgi/trace/full"
4545
secret = "webhook-secret-token-12345"
4646
}
4747

integration/v4_to_v5/testdata/notification_policy_webhooks/expected/terraform.tfstate

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
1818
"account_id": "f037e56e89293a057740de681ac9abbe",
1919
"name": "basic-webhook",
20-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/basic",
20+
"url": "https://www.cloudflare.com/cdn-cgi/trace/basic",
2121
"secret": null,
2222
"type": "generic",
2323
"created_at": "2023-01-01T12:00:00Z",
@@ -39,7 +39,7 @@
3939
"id": "a284b91d-5fa5-4532-abcd-3b1ed5fc9527",
4040
"account_id": "f037e56e89293a057740de681ac9abbe",
4141
"name": "production-webhook",
42-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/full",
42+
"url": "https://www.cloudflare.com/cdn-cgi/trace/full",
4343
"secret": "webhook-secret-token-12345",
4444
"type": "generic",
4545
"created_at": "2023-01-01T12:00:00Z",
@@ -62,7 +62,7 @@
6262
"id": "map-alerts-webhook-id",
6363
"account_id": "f037e56e89293a057740de681ac9abbe",
6464
"name": "alerts-webhook",
65-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/alerts",
65+
"url": "https://www.cloudflare.com/cdn-cgi/trace/alerts",
6666
"secret": "alerts-secret-123",
6767
"type": "generic",
6868
"created_at": "2023-01-02T10:00:00Z",
@@ -77,7 +77,7 @@
7777
"id": "map-monitoring-webhook-id",
7878
"account_id": "f037e56e89293a057740de681ac9abbe",
7979
"name": "monitoring-webhook",
80-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/monitoring",
80+
"url": "https://www.cloudflare.com/cdn-cgi/trace/monitoring",
8181
"secret": "monitoring-secret-456",
8282
"type": "generic",
8383
"created_at": "2023-01-02T10:00:00Z",
@@ -92,7 +92,7 @@
9292
"id": "map-security-webhook-id",
9393
"account_id": "f037e56e89293a057740de681ac9abbe",
9494
"name": "security-webhook",
95-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/security",
95+
"url": "https://www.cloudflare.com/cdn-cgi/trace/security",
9696
"secret": "security-secret-789",
9797
"type": "generic",
9898
"created_at": "2023-01-02T10:00:00Z",
@@ -115,7 +115,7 @@
115115
"id": "set-alpha-webhook-id",
116116
"account_id": "f037e56e89293a057740de681ac9abbe",
117117
"name": "set-alpha",
118-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/set-alpha",
118+
"url": "https://www.cloudflare.com/cdn-cgi/trace/set-alpha",
119119
"secret": null,
120120
"type": "generic",
121121
"created_at": "2023-01-03T11:00:00Z",
@@ -130,7 +130,7 @@
130130
"id": "set-beta-webhook-id",
131131
"account_id": "f037e56e89293a057740de681ac9abbe",
132132
"name": "set-beta",
133-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/set-beta",
133+
"url": "https://www.cloudflare.com/cdn-cgi/trace/set-beta",
134134
"secret": null,
135135
"type": "generic",
136136
"created_at": "2023-01-03T11:00:00Z",
@@ -145,7 +145,7 @@
145145
"id": "set-delta-webhook-id",
146146
"account_id": "f037e56e89293a057740de681ac9abbe",
147147
"name": "set-delta",
148-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/set-delta",
148+
"url": "https://www.cloudflare.com/cdn-cgi/trace/set-delta",
149149
"secret": null,
150150
"type": "generic",
151151
"created_at": "2023-01-03T11:00:00Z",
@@ -160,7 +160,7 @@
160160
"id": "set-gamma-webhook-id",
161161
"account_id": "f037e56e89293a057740de681ac9abbe",
162162
"name": "set-gamma",
163-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/set-gamma",
163+
"url": "https://www.cloudflare.com/cdn-cgi/trace/set-gamma",
164164
"secret": null,
165165
"type": "generic",
166166
"created_at": "2023-01-03T11:00:00Z",
@@ -183,7 +183,7 @@
183183
"id": "counted-0-webhook-id",
184184
"account_id": "f037e56e89293a057740de681ac9abbe",
185185
"name": "webhook-0",
186-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/counted-0",
186+
"url": "https://www.cloudflare.com/cdn-cgi/trace/counted-0",
187187
"secret": null,
188188
"type": "generic",
189189
"created_at": "2023-01-04T12:00:00Z",
@@ -198,7 +198,7 @@
198198
"id": "counted-1-webhook-id",
199199
"account_id": "f037e56e89293a057740de681ac9abbe",
200200
"name": "webhook-1",
201-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/counted-1",
201+
"url": "https://www.cloudflare.com/cdn-cgi/trace/counted-1",
202202
"secret": null,
203203
"type": "generic",
204204
"created_at": "2023-01-04T12:00:00Z",
@@ -213,7 +213,7 @@
213213
"id": "counted-2-webhook-id",
214214
"account_id": "f037e56e89293a057740de681ac9abbe",
215215
"name": "webhook-2",
216-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/counted-2",
216+
"url": "https://www.cloudflare.com/cdn-cgi/trace/counted-2",
217217
"secret": null,
218218
"type": "generic",
219219
"created_at": "2023-01-04T12:00:00Z",
@@ -236,7 +236,7 @@
236236
"id": "conditional-enabled-webhook-id",
237237
"account_id": "f037e56e89293a057740de681ac9abbe",
238238
"name": "conditional-enabled",
239-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/conditional-enabled",
239+
"url": "https://www.cloudflare.com/cdn-cgi/trace/conditional-enabled",
240240
"secret": null,
241241
"type": "generic",
242242
"created_at": "2023-01-05T13:00:00Z",
@@ -258,7 +258,7 @@
258258
"id": "functions-webhook-id",
259259
"account_id": "f037e56e89293a057740de681ac9abbe",
260260
"name": "test-integration-function-example",
261-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/function-test",
261+
"url": "https://www.cloudflare.com/cdn-cgi/trace/function-test",
262262
"secret": "function-test-secret",
263263
"type": "generic",
264264
"created_at": "2023-01-06T14:00:00Z",
@@ -280,7 +280,7 @@
280280
"id": "lifecycle-webhook-id",
281281
"account_id": "f037e56e89293a057740de681ac9abbe",
282282
"name": "lifecycle-test",
283-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/lifecycle",
283+
"url": "https://www.cloudflare.com/cdn-cgi/trace/lifecycle",
284284
"secret": null,
285285
"type": "generic",
286286
"created_at": "2023-01-07T15:00:00Z",
@@ -302,7 +302,7 @@
302302
"id": "prevent-destroy-webhook-id",
303303
"account_id": "f037e56e89293a057740de681ac9abbe",
304304
"name": "prevent-destroy-test",
305-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/prevent-destroy",
305+
"url": "https://www.cloudflare.com/cdn-cgi/trace/prevent-destroy",
306306
"secret": null,
307307
"type": "generic",
308308
"created_at": "2023-01-07T15:30:00Z",
@@ -324,7 +324,7 @@
324324
"id": "minimal-webhook-id",
325325
"account_id": "f037e56e89293a057740de681ac9abbe",
326326
"name": "minimal",
327-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/minimal",
327+
"url": "https://www.cloudflare.com/cdn-cgi/trace/minimal",
328328
"secret": null,
329329
"type": "generic",
330330
"created_at": "2023-01-08T16:00:00Z",
@@ -346,7 +346,7 @@
346346
"id": "maximal-webhook-id",
347347
"account_id": "f037e56e89293a057740de681ac9abbe",
348348
"name": "maximal-webhook-with-all-fields",
349-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/maximal?param=value&test=123",
349+
"url": "https://www.cloudflare.com/cdn-cgi/trace/maximal?param=value&test=123",
350350
"secret": "maximal-secret-token-with-special-chars-!@#$",
351351
"type": "generic",
352352
"created_at": "2023-01-09T17:00:00Z",
@@ -368,7 +368,7 @@
368368
"id": "special-chars-webhook-id",
369369
"account_id": "f037e56e89293a057740de681ac9abbe",
370370
"name": "special-chars-test",
371-
"url": "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/path?query=value&param=test",
371+
"url": "https://www.cloudflare.com/cdn-cgi/trace/path?query=value&param=test",
372372
"secret": null,
373373
"type": "generic",
374374
"created_at": "2023-01-10T18:00:00Z",

integration/v4_to_v5/testdata/notification_policy_webhooks/input/notification_policy_webhooks.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ variable "cloudflare_zone_id" {
1111
type = string
1212
}
1313

14-
# Use pre-existing webhook endpoint worker
15-
# Worker URL: https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/
16-
# This worker responds with 200 OK to all requests for webhook validation
14+
# Use Cloudflare trace endpoint for webhook testing
15+
# URL: https://www.cloudflare.com/cdn-cgi/trace
16+
# This endpoint responds with 200 OK to all requests for webhook validation
1717

1818
# ========================================
1919
# Locals
2020
# ========================================
2121
locals {
2222
common_account = var.cloudflare_account_id
2323
name_prefix = "test-integration"
24-
webhook_base_url = "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev"
24+
webhook_base_url = "https://www.cloudflare.com/cdn-cgi/trace"
2525
enable_backup = true
2626
enable_test = false
2727
}
@@ -34,14 +34,14 @@ locals {
3434
resource "cloudflare_notification_policy_webhooks" "basic_webhook" {
3535
account_id = var.cloudflare_account_id
3636
name = "basic-webhook"
37-
url = "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/basic"
37+
url = "https://www.cloudflare.com/cdn-cgi/trace/basic"
3838
}
3939

4040
# Test Case 2: Full webhook with all fields
4141
resource "cloudflare_notification_policy_webhooks" "full_webhook" {
4242
account_id = var.cloudflare_account_id
4343
name = "production-webhook"
44-
url = "https://e2e-webhook-endpoint.terraform-testing-a09.workers.dev/full"
44+
url = "https://www.cloudflare.com/cdn-cgi/trace/full"
4545
secret = "webhook-secret-token-12345"
4646
}
4747

0 commit comments

Comments
 (0)