diff --git a/datadog/resource_datadog_synthetics_test_.go b/datadog/resource_datadog_synthetics_test_.go index fee88f3da..56008a5ca 100644 --- a/datadog/resource_datadog_synthetics_test_.go +++ b/datadog/resource_datadog_synthetics_test_.go @@ -2940,7 +2940,6 @@ func buildDatadogExtractedValues(stepExtractedValues []interface{}) []datadogV1. value.SetName(extractedValueMap["name"].(string)) value.SetType(datadogV1.SyntheticsLocalVariableParsingOptionsType(extractedValueMap["type"].(string))) - if extractedValueMap["field"] != "" { value.SetField(extractedValueMap["field"].(string)) } @@ -2950,7 +2949,9 @@ func buildDatadogExtractedValues(stepExtractedValues []interface{}) []datadogV1. parser := datadogV1.SyntheticsVariableParser{} parser.SetType(datadogV1.SyntheticsGlobalVariableParserType(valueParser["type"].(string))) - parser.SetValue(valueParser["value"].(string)) + if valueParser["value"] != "" { + parser.SetValue(valueParser["value"].(string)) + } value.SetParser(parser) diff --git a/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze b/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze index bad005c2b..708a8663b 100644 --- a/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze +++ b/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze @@ -1 +1 @@ -2024-09-03T18:07:48.653153+02:00 \ No newline at end of file +2024-09-12T18:47:44.314895+02:00 \ No newline at end of file diff --git a/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.yaml b/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.yaml index d749f1a92..4c22c29b7 100644 --- a/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.yaml +++ b/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.yaml @@ -13,7 +13,7 @@ interactions: remote_addr: "" request_uri: "" body: | - {"description":"a global variable","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1725379668","tags":["foo:bar","baz"],"value":{"secure":false,"value":"variable-value"}} + {"description":"a global variable","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1726159664","tags":["foo:bar","baz"],"value":{"secure":false,"value":"variable-value"}} form: {} headers: Accept: @@ -32,13 +32,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1725379668","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"last_error":null,"value":{"secure":false,"value":"variable-value"}} + {"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1726159664","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"last_error":null,"value":{"secure":false,"value":"variable-value"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 504.72325ms + duration: 450.161792ms - id: 1 request: proto: HTTP/1.1 @@ -55,7 +55,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/variables/2a5811e8-9d7e-4122-98d3-9b954a7d2b24 + url: https://api.datadoghq.com/api/v1/synthetics/variables/5c2f251a-9a5e-43d2-b947-9beaa947cdc9 method: GET response: proto: HTTP/1.1 @@ -67,13 +67,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1725379668","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-03T16:07:52.304879+00:00","modified_at":"2024-09-03T16:07:52.304879+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1726159664","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-12T16:47:46.417655+00:00","modified_at":"2024-09-12T16:47:46.417655+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 174.640584ms + duration: 165.572458ms - id: 2 request: proto: HTTP/1.1 @@ -90,7 +90,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/variables/2a5811e8-9d7e-4122-98d3-9b954a7d2b24 + url: https://api.datadoghq.com/api/v1/synthetics/variables/5c2f251a-9a5e-43d2-b947-9beaa947cdc9 method: GET response: proto: HTTP/1.1 @@ -102,26 +102,26 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1725379668","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-03T16:07:52.304879+00:00","modified_at":"2024-09-03T16:07:52.304879+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1726159664","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-12T16:47:46.417655+00:00","modified_at":"2024-09-12T16:47:46.417655+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 167.361125ms + duration: 163.575ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 4575 + content_length: 4669 transfer_encoding: [] trailer: {} host: api.datadoghq.com remote_addr: "" request_uri: "" body: | - {"config":{"assertions":[],"configVariables":[{"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"content":"content-certificate","filename":"Provided in Terraform config"},"key":{"content":"content-key","filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc"},{"name":"Wait step","subtype":"wait","value":5}]},"locations":["aws:eu-central-1"],"message":"Notify @datadog.user","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1725379668","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"status":"paused","subtype":"multi","tags":["multistep"],"type":"api"} + {"config":{"assertions":[],"configVariables":[{"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"content":"content-certificate","filename":"Provided in Terraform config"},"key":{"content":"content-key","filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"},{"name":"VAR_EXTRACT_MESSAGE_2","parser":{"type":"raw"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc"},{"name":"Wait step","subtype":"wait","value":5}]},"locations":["aws:eu-central-1"],"message":"Notify @datadog.user","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1726159664","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"status":"paused","subtype":"multi","tags":["multistep"],"type":"api"} form: {} headers: Accept: @@ -140,13 +140,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"kb5-zi6-mzu","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1725379668","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-03T16:07:53.165810+00:00","modified_at":"2024-09-03T16:07:53.165810+00:00","config":{"assertions":[],"configVariables":[{"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"wmt-jwn-cm2"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b9g-8sx-wfs"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"5ni-acn-r8h"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b3g-jst-jti"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"6am-x24-vft"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"equ-zge-g6q"},{"name":"Wait step","subtype":"wait","value":5,"id":"269-s2i-xdu"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":152885839,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gxh-spf-x6q","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1726159664","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-12T16:47:47.249290+00:00","modified_at":"2024-09-12T16:47:47.249290+00:00","config":{"assertions":[],"configVariables":[{"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"r9c-zt9-mrn"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"zd7-kiw-z7k"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"9h4-mma-kyy"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"yf3-8n7-fy8"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"aed-pb5-42t"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"},{"name":"VAR_EXTRACT_MESSAGE_2","parser":{"type":"raw"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"4ht-956-d3n"},{"name":"Wait step","subtype":"wait","value":5,"id":"gjh-g5n-8mq"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","created_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"deleted_at":null,"monitor_id":153739245,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 1.089993916s + duration: 510.363291ms - id: 4 request: proto: HTTP/1.1 @@ -163,7 +163,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/api/kb5-zi6-mzu + url: https://api.datadoghq.com/api/v1/synthetics/tests/api/gxh-spf-x6q method: GET response: proto: HTTP/1.1 @@ -175,13 +175,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"kb5-zi6-mzu","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1725379668","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-03T16:07:53.165810+00:00","modified_at":"2024-09-03T16:07:53.165810+00:00","config":{"assertions":[],"configVariables":[{"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"wmt-jwn-cm2"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b9g-8sx-wfs"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"5ni-acn-r8h"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b3g-jst-jti"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"6am-x24-vft"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"equ-zge-g6q"},{"name":"Wait step","subtype":"wait","value":5,"id":"269-s2i-xdu"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":152885839,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gxh-spf-x6q","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1726159664","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-12T16:47:47.249290+00:00","modified_at":"2024-09-12T16:47:47.249290+00:00","config":{"assertions":[],"configVariables":[{"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"r9c-zt9-mrn"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"zd7-kiw-z7k"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"9h4-mma-kyy"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"yf3-8n7-fy8"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"aed-pb5-42t"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"},{"name":"VAR_EXTRACT_MESSAGE_2","parser":{"type":"raw"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"4ht-956-d3n"},{"name":"Wait step","subtype":"wait","value":5,"id":"gjh-g5n-8mq"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":153739245,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 172.084ms + duration: 200.029375ms - id: 5 request: proto: HTTP/1.1 @@ -198,7 +198,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/variables/2a5811e8-9d7e-4122-98d3-9b954a7d2b24 + url: https://api.datadoghq.com/api/v1/synthetics/variables/5c2f251a-9a5e-43d2-b947-9beaa947cdc9 method: GET response: proto: HTTP/1.1 @@ -210,13 +210,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1725379668","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-03T16:07:52.304879+00:00","modified_at":"2024-09-03T16:07:52.304879+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1726159664","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-12T16:47:46.417655+00:00","modified_at":"2024-09-12T16:47:46.417655+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 161.47825ms + duration: 207.491542ms - id: 6 request: proto: HTTP/1.1 @@ -233,7 +233,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/variables/2a5811e8-9d7e-4122-98d3-9b954a7d2b24 + url: https://api.datadoghq.com/api/v1/synthetics/variables/5c2f251a-9a5e-43d2-b947-9beaa947cdc9 method: GET response: proto: HTTP/1.1 @@ -245,13 +245,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1725379668","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-03T16:07:52.304879+00:00","modified_at":"2024-09-03T16:07:52.304879+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1726159664","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-09-12T16:47:46.417655+00:00","modified_at":"2024-09-12T16:47:46.417655+00:00","last_error":null,"value":{"secure":false,"value":"variable-value"},"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"},"editor":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 153.848667ms + duration: 169.091875ms - id: 7 request: proto: HTTP/1.1 @@ -268,7 +268,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/kb5-zi6-mzu + url: https://api.datadoghq.com/api/v1/synthetics/tests/gxh-spf-x6q method: GET response: proto: HTTP/1.1 @@ -280,13 +280,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"kb5-zi6-mzu","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1725379668","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-03T16:07:53.165810+00:00","modified_at":"2024-09-03T16:07:53.165810+00:00","config":{"assertions":[],"configVariables":[{"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"wmt-jwn-cm2"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b9g-8sx-wfs"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"5ni-acn-r8h"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b3g-jst-jti"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"6am-x24-vft"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"equ-zge-g6q"},{"name":"Wait step","subtype":"wait","value":5,"id":"269-s2i-xdu"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":152885839,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gxh-spf-x6q","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1726159664","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-12T16:47:47.249290+00:00","modified_at":"2024-09-12T16:47:47.249290+00:00","config":{"assertions":[],"configVariables":[{"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"r9c-zt9-mrn"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"zd7-kiw-z7k"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"9h4-mma-kyy"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"yf3-8n7-fy8"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"aed-pb5-42t"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"},{"name":"VAR_EXTRACT_MESSAGE_2","parser":{"type":"raw"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"4ht-956-d3n"},{"name":"Wait step","subtype":"wait","value":5,"id":"gjh-g5n-8mq"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":153739245,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 164.664459ms + duration: 174.971084ms - id: 8 request: proto: HTTP/1.1 @@ -303,7 +303,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/api/kb5-zi6-mzu + url: https://api.datadoghq.com/api/v1/synthetics/tests/api/gxh-spf-x6q method: GET response: proto: HTTP/1.1 @@ -315,13 +315,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"kb5-zi6-mzu","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1725379668","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-03T16:07:53.165810+00:00","modified_at":"2024-09-03T16:07:53.165810+00:00","config":{"assertions":[],"configVariables":[{"id":"2a5811e8-9d7e-4122-98d3-9b954a7d2b24","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"wmt-jwn-cm2"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b9g-8sx-wfs"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"5ni-acn-r8h"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"b3g-jst-jti"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"6am-x24-vft"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"equ-zge-g6q"},{"name":"Wait step","subtype":"wait","value":5,"id":"269-s2i-xdu"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":152885839,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gxh-spf-x6q","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1726159664","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-09-12T16:47:47.249290+00:00","modified_at":"2024-09-12T16:47:47.249290+00:00","config":{"assertions":[],"configVariables":[{"id":"5c2f251a-9a5e-43d2-b947-9beaa947cdc9","name":"VARIABLE_NAME","type":"global"}],"steps":[{"allowFailure":true,"assertions":[{"operator":"is","target":200,"type":"statusCode"},{"operator":"validatesJSONSchema","target":{"jsonSchema":"{\"type\": \"object\", \"properties\":{\"slideshow\":{\"type\":\"object\"}}}","metaSchema":"draft-07"},"type":"body"}],"extractedValues":[{"name":"VAR_EXTRACT_BODY","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"http_body"},{"field":"content-length","name":"VAR_EXTRACT_HEADER","parser":{"type":"regex","value":".*"},"secure":true,"type":"http_header"}],"isCritical":false,"name":"First api step","request":{"allow_insecure":true,"basicAuth":{"accessKey":"sigv4-access-key","region":"sigv4-region","secretKey":"sigv4-secret-key","serviceName":"sigv4-service-name","sessionToken":"sigv4-session-token","type":"sigv4"},"body":"this is a body","certificate":{"cert":{"filename":"Provided in Terraform config"},"key":{"filename":"key"}},"follow_redirects":true,"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"httpVersion":"http2","method":"POST","noSavingResponseBody":true,"persistCookies":false,"proxy":{"headers":{"Accept":"application/json","X-Datadog-Trace-ID":"123456789"},"url":"https://proxy.url"},"query":{"foo":"bar"},"timeout":30,"url":"https://www.datadoghq.com"},"retry":{"count":5,"interval":1000},"subtype":"http","id":"r9c-zt9-mrn"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Second api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","scope":"scope","tokenApiAuthentication":"header","type":"oauth-client"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"zd7-kiw-z7k"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Third api step","request":{"allow_insecure":true,"basicAuth":{"accessTokenUrl":"https://token.datadoghq.com","audience":"audience","clientId":"client-id","clientSecret":"client-secret","password":"password","resource":"resource","scope":"scope","tokenApiAuthentication":"body","type":"oauth-rop","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"9h4-mma-kyy"},{"allowFailure":false,"assertions":[{"operator":"is","target":200,"type":"statusCode"}],"extractedValues":[],"isCritical":false,"name":"Fourth api step","request":{"allow_insecure":true,"basicAuth":{"password":"password","type":"digest","username":"username"},"follow_redirects":true,"httpVersion":"any","method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"yf3-8n7-fy8"},{"allowFailure":false,"assertions":[{"operator":"is","target":1,"type":"grpcHealthcheckStatus"}],"extractedValues":[],"isCritical":false,"name":"gRPC health check step","request":{"allow_insecure":false,"callType":"healthcheck","host":"https://docs.datadoghq.com","message":"","metadata":{"foo":"bar"},"method":"","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"aed-pb5-42t"},{"allowFailure":false,"assertions":[{"operator":"validatesJSONPath","target":{"elementsOperator":"firstElementMatches","jsonPath":"$.message","operator":"is","targetValue":"Hello, John!"},"type":"grpcProto"}],"extractedValues":[{"name":"VAR_EXTRACT_MESSAGE","parser":{"type":"json_path","value":"$.id"},"secure":false,"type":"grpc_message"},{"name":"VAR_EXTRACT_MESSAGE_2","parser":{"type":"raw"},"secure":false,"type":"grpc_message"}],"isCritical":false,"name":"gRPC behavior check step","request":{"allow_insecure":false,"callType":"unary","compressedProtoFile":"eJwqzs9NVSgoyi/JV0jLzEkFBAAA//8u0wXJ","host":"https://docs.datadoghq.com","message":"{\"name\": \"John\"}","metadata":{"foo":"bar"},"method":"SayHello","port":"443","service":"greeter.Greeter","timeout":0},"subtype":"grpc","id":"4ht-956-d3n"},{"name":"Wait step","subtype":"wait","value":5,"id":"gjh-g5n-8mq"}]},"message":"Notify @datadog.user","options":{"httpVersion":"any","min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":153739245,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 159.966792ms + duration: 146.511083ms - id: 9 request: proto: HTTP/1.1 @@ -334,7 +334,7 @@ interactions: remote_addr: "" request_uri: "" body: | - {"public_ids":["kb5-zi6-mzu"]} + {"public_ids":["gxh-spf-x6q"]} form: {} headers: Accept: @@ -353,13 +353,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"deleted_tests":[{"public_id":"kb5-zi6-mzu","deleted_at":"2024-09-03T16:07:57.026264+00:00"}]} + {"deleted_tests":[{"public_id":"gxh-spf-x6q","deleted_at":"2024-09-12T16:47:50.605912+00:00"}]} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 779.27275ms + duration: 575.61325ms - id: 10 request: proto: HTTP/1.1 @@ -376,7 +376,7 @@ interactions: headers: Accept: - '*/*' - url: https://api.datadoghq.com/api/v1/synthetics/variables/2a5811e8-9d7e-4122-98d3-9b954a7d2b24 + url: https://api.datadoghq.com/api/v1/synthetics/variables/5c2f251a-9a5e-43d2-b947-9beaa947cdc9 method: DELETE response: proto: HTTP/1.1 @@ -392,7 +392,7 @@ interactions: - text/html; charset=utf-8 status: 200 OK code: 200 - duration: 183.63ms + duration: 185.553ms - id: 11 request: proto: HTTP/1.1 @@ -409,7 +409,7 @@ interactions: headers: Accept: - application/json - url: https://api.datadoghq.com/api/v1/synthetics/tests/kb5-zi6-mzu + url: https://api.datadoghq.com/api/v1/synthetics/tests/gxh-spf-x6q method: GET response: proto: HTTP/1.1 @@ -426,4 +426,4 @@ interactions: - application/json status: 404 Not Found code: 404 - duration: 136.249458ms + duration: 143.161916ms diff --git a/datadog/tests/resource_datadog_synthetics_test_test.go b/datadog/tests/resource_datadog_synthetics_test_test.go index c278f698a..40033ee72 100644 --- a/datadog/tests/resource_datadog_synthetics_test_test.go +++ b/datadog/tests/resource_datadog_synthetics_test_test.go @@ -4705,7 +4705,7 @@ func createSyntheticsMultistepAPITest(ctx context.Context, accProvider func() (* resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.5.assertion.0.targetjsonpath.0.targetvalue", "Hello, John!"), resource.TestCheckResourceAttr( - "datadog_synthetics_test.multi", "api_step.5.extracted_value.#", "1"), + "datadog_synthetics_test.multi", "api_step.5.extracted_value.#", "2"), resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.5.extracted_value.0.name", "VAR_EXTRACT_MESSAGE"), resource.TestCheckResourceAttr( @@ -4716,6 +4716,14 @@ func createSyntheticsMultistepAPITest(ctx context.Context, accProvider func() (* "datadog_synthetics_test.multi", "api_step.5.extracted_value.0.parser.0.type", "json_path"), resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.5.extracted_value.0.parser.0.value", "$.id"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.multi", "api_step.5.extracted_value.1.name", "VAR_EXTRACT_MESSAGE_2"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.multi", "api_step.5.extracted_value.1.type", "grpc_message"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.multi", "api_step.5.extracted_value.1.parser.#", "1"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.multi", "api_step.5.extracted_value.1.parser.0.type", "raw"), resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.6.name", "Wait step"), resource.TestCheckResourceAttr( @@ -4965,6 +4973,13 @@ resource "datadog_synthetics_test" "multi" { type = "json_path" value = "$.id" } + } + extracted_value { + name = "VAR_EXTRACT_MESSAGE_2" + type = "grpc_message" + parser { + type = "raw" + } } } api_step {