Skip to content

Commit 180c945

Browse files
fix example for grpc assertions (#2941)
1 parent 8eda2cf commit 180c945

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/resources/synthetics_test.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,10 @@ resource "datadog_synthetics_test" "test_multi_step" {
310310
subtype = "grpc"
311311
312312
assertion {
313-
type = "statusCode"
313+
type = "grpcMetadata"
314314
operator = "is"
315-
target = "200"
315+
property = "X-Header"
316+
target = "test"
316317
}
317318
318319
request_definition {
@@ -328,9 +329,9 @@ resource "datadog_synthetics_test" "test_multi_step" {
328329
subtype = "grpc"
329330
330331
assertion {
331-
type = "statusCode"
332+
type = "grpcHealthcheckStatus"
332333
operator = "is"
333-
target = "200"
334+
target = "1"
334335
}
335336
336337
request_definition {

examples/resources/datadog_synthetics_test/resource.tf

+5-4
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,10 @@ resource "datadog_synthetics_test" "test_multi_step" {
269269
subtype = "grpc"
270270

271271
assertion {
272-
type = "statusCode"
272+
type = "grpcMetadata"
273273
operator = "is"
274-
target = "200"
274+
property = "X-Header"
275+
target = "test"
275276
}
276277

277278
request_definition {
@@ -287,9 +288,9 @@ resource "datadog_synthetics_test" "test_multi_step" {
287288
subtype = "grpc"
288289

289290
assertion {
290-
type = "statusCode"
291+
type = "grpcHealthcheckStatus"
291292
operator = "is"
292-
target = "200"
293+
target = "1"
293294
}
294295

295296
request_definition {

0 commit comments

Comments
 (0)