From d1ac705765a349c32e67fcfd0f298f89d57eec53 Mon Sep 17 00:00:00 2001 From: Teodor Todorov Date: Tue, 2 Jul 2024 16:42:25 +0200 Subject: [PATCH 1/3] add handling of a wait step for multistep api tests --- datadog/resource_datadog_synthetics_test_.go | 226 ++++++++++-------- .../resource_datadog_synthetics_test_test.go | 12 + 2 files changed, 134 insertions(+), 104 deletions(-) diff --git a/datadog/resource_datadog_synthetics_test_.go b/datadog/resource_datadog_synthetics_test_.go index d46d4e0e5a..89a903e733 100644 --- a/datadog/resource_datadog_synthetics_test_.go +++ b/datadog/resource_datadog_synthetics_test_.go @@ -803,7 +803,7 @@ func syntheticsTestAPIStep() *schema.Schema { requestElemSchema.Schema["follow_redirects"] = syntheticsFollowRedirectsOption() return &schema.Schema{ - Description: "Steps for multistep api tests", + Description: "Steps for multi-step api tests", Type: schema.TypeList, Optional: true, Elem: &schema.Resource{ @@ -814,11 +814,11 @@ func syntheticsTestAPIStep() *schema.Schema { Required: true, }, "subtype": { - Description: "The subtype of the Synthetic multistep API test step.", + Description: "The subtype of the Synthetic multi-step API test step.", Type: schema.TypeString, Optional: true, Default: "http", - ValidateDiagFunc: validators.ValidateEnumValue(datadogV1.NewSyntheticsAPIStepSubtypeFromValue), + ValidateDiagFunc: validators.ValidateEnumValue(datadogV1.NewSyntheticsAPITestStepSubtypeFromValue, datadogV1.NewSyntheticsAPIWaitStepSubtypeFromValue), }, "extracted_value": { Description: "Values to parse and save as variables from the response.", @@ -894,6 +894,11 @@ func syntheticsTestAPIStep() *schema.Schema { Optional: true, }, "retry": syntheticsTestOptionsRetry(), + "value": { + Description: "The time to wait in seconds. Minimum value: 0. Maximum value: 180.", + Type: schema.TypeInt, + Optional: true, + }, }, }, } @@ -1677,54 +1682,60 @@ func buildSyntheticsAPITestStruct(d *schema.ResourceData) *datadogV1.SyntheticsA step := datadogV1.SyntheticsAPIStep{} stepMap := s.(map[string]interface{}) - step.SetName(stepMap["name"].(string)) - step.SetSubtype(datadogV1.SyntheticsAPIStepSubtype(stepMap["subtype"].(string))) - - extractedValues := buildExtractedValues(stepMap["extracted_value"].([]interface{})) - step.SetExtractedValues(extractedValues) - - assertions := stepMap["assertion"].([]interface{}) - step.SetAssertions(buildAssertions(assertions)) - - request := datadogV1.SyntheticsTestRequest{} - requests := stepMap["request_definition"].([]interface{}) - if len(requests) > 0 && requests[0] != nil { - requestMap := requests[0].(map[string]interface{}) - request.SetMethod(requestMap["method"].(string)) - request.SetUrl(requestMap["url"].(string)) - request.SetBody(requestMap["body"].(string)) - if v, ok := requestMap["body_type"].(string); ok && v != "" { - request.SetBodyType(datadogV1.SyntheticsTestRequestBodyType(v)) - } - request.SetTimeout(float64(requestMap["timeout"].(int))) - request.SetAllowInsecure(requestMap["allow_insecure"].(bool)) - request.SetFollowRedirects(requestMap["follow_redirects"].(bool)) - request.SetPersistCookies(requestMap["persist_cookies"].(bool)) - request.SetNoSavingResponseBody(requestMap["no_saving_response_body"].(bool)) - if v, ok := requestMap["http_version"].(string); ok && v != "" { - request.SetHttpVersion(datadogV1.SyntheticsTestOptionsHTTPVersion(v)) + if step.SyntheticsAPITestStep != nil { + step.SyntheticsAPITestStep.SetName(stepMap["name"].(string)) + step.SyntheticsAPITestStep.SetSubtype(datadogV1.SyntheticsAPITestStepSubtype(stepMap["subtype"].(string))) + + extractedValues := buildExtractedValues(stepMap["extracted_value"].([]interface{})) + step.SyntheticsAPITestStep.SetExtractedValues(extractedValues) + + assertions := stepMap["assertion"].([]interface{}) + step.SyntheticsAPITestStep.SetAssertions(buildAssertions(assertions)) + + request := datadogV1.SyntheticsTestRequest{} + requests := stepMap["request_definition"].([]interface{}) + if len(requests) > 0 && requests[0] != nil { + requestMap := requests[0].(map[string]interface{}) + request.SetMethod(requestMap["method"].(string)) + request.SetUrl(requestMap["url"].(string)) + request.SetBody(requestMap["body"].(string)) + if v, ok := requestMap["body_type"].(string); ok && v != "" { + request.SetBodyType(datadogV1.SyntheticsTestRequestBodyType(v)) + } + request.SetTimeout(float64(requestMap["timeout"].(int))) + request.SetAllowInsecure(requestMap["allow_insecure"].(bool)) + request.SetFollowRedirects(requestMap["follow_redirects"].(bool)) + request.SetPersistCookies(requestMap["persist_cookies"].(bool)) + request.SetNoSavingResponseBody(requestMap["no_saving_response_body"].(bool)) + if v, ok := requestMap["http_version"].(string); ok && v != "" { + request.SetHttpVersion(datadogV1.SyntheticsTestOptionsHTTPVersion(v)) + } } - } - request = *completeSyntheticsTestRequest(request, stepMap["request_headers"].(map[string]interface{}), stepMap["request_query"].(map[string]interface{}), stepMap["request_basicauth"].([]interface{}), stepMap["request_client_certificate"].([]interface{}), stepMap["request_proxy"].([]interface{}), map[string]interface{}{}) + request = *completeSyntheticsTestRequest(request, stepMap["request_headers"].(map[string]interface{}), stepMap["request_query"].(map[string]interface{}), stepMap["request_basicauth"].([]interface{}), stepMap["request_client_certificate"].([]interface{}), stepMap["request_proxy"].([]interface{}), map[string]interface{}{}) - step.SetRequest(request) + step.SyntheticsAPITestStep.SetRequest(request) - step.SetAllowFailure(stepMap["allow_failure"].(bool)) - step.SetIsCritical(stepMap["is_critical"].(bool)) + step.SyntheticsAPITestStep.SetAllowFailure(stepMap["allow_failure"].(bool)) + step.SyntheticsAPITestStep.SetIsCritical(stepMap["is_critical"].(bool)) - optionsRetry := datadogV1.SyntheticsTestOptionsRetry{} - retries := stepMap["retry"].([]interface{}) - if len(retries) > 0 && retries[0] != nil { - retry := retries[0] + optionsRetry := datadogV1.SyntheticsTestOptionsRetry{} + retries := stepMap["retry"].([]interface{}) + if len(retries) > 0 && retries[0] != nil { + retry := retries[0] - if count, ok := retry.(map[string]interface{})["count"]; ok { - optionsRetry.SetCount(int64(count.(int))) - } - if interval, ok := retry.(map[string]interface{})["interval"]; ok { - optionsRetry.SetInterval(float64(interval.(int))) + if count, ok := retry.(map[string]interface{})["count"]; ok { + optionsRetry.SetCount(int64(count.(int))) + } + if interval, ok := retry.(map[string]interface{})["interval"]; ok { + optionsRetry.SetInterval(float64(interval.(int))) + } + step.SyntheticsAPITestStep.SetRetry(optionsRetry) } - step.SetRetry(optionsRetry) + } else if step.SyntheticsAPIWaitStep != nil { + step.SyntheticsAPIWaitStep.SetName(stepMap["name"].(string)) + step.SyntheticsAPIWaitStep.SetSubtype(datadogV1.SyntheticsAPIWaitStepSubtype(stepMap["subtype"].(string))) + step.SyntheticsAPIWaitStep.SetValue(int32(stepMap["value"].(int))) } steps = append(steps, step) @@ -3350,78 +3361,85 @@ func updateSyntheticsAPITestLocalState(d *schema.ResourceData, syntheticsTest *d for i, step := range *steps { localStep := make(map[string]interface{}) - localStep["name"] = step.GetName() - localStep["subtype"] = step.GetSubtype() - - localAssertions, err := buildLocalAssertions(step.GetAssertions()) - if err != nil { - return diag.FromErr(err) - } - localStep["assertion"] = localAssertions - localStep["extracted_value"] = buildLocalExtractedValues(step.GetExtractedValues()) - - stepRequest := step.GetRequest() - localRequest := buildLocalRequest(stepRequest) - localRequest["allow_insecure"] = stepRequest.GetAllowInsecure() - localRequest["follow_redirects"] = stepRequest.GetFollowRedirects() - localStep["request_definition"] = []map[string]interface{}{localRequest} - localStep["request_headers"] = stepRequest.GetHeaders() - localStep["request_query"] = stepRequest.GetQuery() - - if basicAuth, ok := stepRequest.GetBasicAuthOk(); ok { - localAuth := buildLocalBasicAuth(basicAuth) - localStep["request_basicauth"] = []map[string]string{localAuth} - } - if clientCertificate, ok := stepRequest.GetCertificateOk(); ok { - localCertificate := make(map[string][]map[string]string) - localCertificate["cert"] = make([]map[string]string, 1) - localCertificate["cert"][0] = make(map[string]string) - localCertificate["key"] = make([]map[string]string, 1) - localCertificate["key"][0] = make(map[string]string) + if step.SyntheticsAPITestStep != nil { + localStep["name"] = step.SyntheticsAPITestStep.GetName() + localStep["subtype"] = step.SyntheticsAPITestStep.GetSubtype() - cert := clientCertificate.GetCert() - localCertificate["cert"][0]["filename"] = cert.GetFilename() + localAssertions, err := buildLocalAssertions(step.SyntheticsAPITestStep.GetAssertions()) + if err != nil { + return diag.FromErr(err) + } + localStep["assertion"] = localAssertions + localStep["extracted_value"] = buildLocalExtractedValues(step.SyntheticsAPITestStep.GetExtractedValues()) + + stepRequest := step.SyntheticsAPITestStep.GetRequest() + localRequest := buildLocalRequest(stepRequest) + localRequest["allow_insecure"] = stepRequest.GetAllowInsecure() + localRequest["follow_redirects"] = stepRequest.GetFollowRedirects() + localStep["request_definition"] = []map[string]interface{}{localRequest} + localStep["request_headers"] = stepRequest.GetHeaders() + localStep["request_query"] = stepRequest.GetQuery() + + if basicAuth, ok := stepRequest.GetBasicAuthOk(); ok { + localAuth := buildLocalBasicAuth(basicAuth) + localStep["request_basicauth"] = []map[string]string{localAuth} + } - key := clientCertificate.GetKey() - localCertificate["key"][0]["filename"] = key.GetFilename() + if clientCertificate, ok := stepRequest.GetCertificateOk(); ok { + localCertificate := make(map[string][]map[string]string) + localCertificate["cert"] = make([]map[string]string, 1) + localCertificate["cert"][0] = make(map[string]string) + localCertificate["key"] = make([]map[string]string, 1) + localCertificate["key"][0] = make(map[string]string) - certContentKey := fmt.Sprintf("api_step.%d.request_client_certificate.0.cert.0.content", i) - keyContentKey := fmt.Sprintf("api_step.%d.request_client_certificate.0.key.0.content", i) + cert := clientCertificate.GetCert() + localCertificate["cert"][0]["filename"] = cert.GetFilename() - // the content of client certificate is write-only so it will not be returned by the API. - // To avoid useless diff but also prevent storing the value in clear in the state - // we store a hash of the value. - if configCertificateContent, ok := d.GetOk(certContentKey); ok { - localCertificate["cert"][0]["content"] = getCertificateStateValue(configCertificateContent.(string)) - } - if configKeyContent, ok := d.GetOk(keyContentKey); ok { - localCertificate["key"][0]["content"] = getCertificateStateValue(configKeyContent.(string)) - } + key := clientCertificate.GetKey() + localCertificate["key"][0]["filename"] = key.GetFilename() - localStep["request_client_certificate"] = []map[string][]map[string]string{localCertificate} - } + certContentKey := fmt.Sprintf("api_step.%d.request_client_certificate.0.cert.0.content", i) + keyContentKey := fmt.Sprintf("api_step.%d.request_client_certificate.0.key.0.content", i) - if proxy, ok := stepRequest.GetProxyOk(); ok { - localProxy := make(map[string]interface{}) - localProxy["url"] = proxy.GetUrl() - localProxy["headers"] = proxy.GetHeaders() + // the content of client certificate is write-only so it will not be returned by the API. + // To avoid useless diff but also prevent storing the value in clear in the state + // we store a hash of the value. + if configCertificateContent, ok := d.GetOk(certContentKey); ok { + localCertificate["cert"][0]["content"] = getCertificateStateValue(configCertificateContent.(string)) + } + if configKeyContent, ok := d.GetOk(keyContentKey); ok { + localCertificate["key"][0]["content"] = getCertificateStateValue(configKeyContent.(string)) + } - localStep["request_proxy"] = []map[string]interface{}{localProxy} - } + localStep["request_client_certificate"] = []map[string][]map[string]string{localCertificate} + } - localStep["allow_failure"] = step.GetAllowFailure() - localStep["is_critical"] = step.GetIsCritical() + if proxy, ok := stepRequest.GetProxyOk(); ok { + localProxy := make(map[string]interface{}) + localProxy["url"] = proxy.GetUrl() + localProxy["headers"] = proxy.GetHeaders() - if retry, ok := step.GetRetryOk(); ok { - localRetry := make(map[string]interface{}) - if count, ok := retry.GetCountOk(); ok { - localRetry["count"] = *count + localStep["request_proxy"] = []map[string]interface{}{localProxy} } - if interval, ok := retry.GetIntervalOk(); ok { - localRetry["interval"] = *interval + + localStep["allow_failure"] = step.SyntheticsAPITestStep.GetAllowFailure() + localStep["is_critical"] = step.SyntheticsAPITestStep.GetIsCritical() + + if retry, ok := step.SyntheticsAPITestStep.GetRetryOk(); ok { + localRetry := make(map[string]interface{}) + if count, ok := retry.GetCountOk(); ok { + localRetry["count"] = *count + } + if interval, ok := retry.GetIntervalOk(); ok { + localRetry["interval"] = *interval + } + localStep["retry"] = []map[string]interface{}{localRetry} } - localStep["retry"] = []map[string]interface{}{localRetry} + } else if step.SyntheticsAPIWaitStep != nil { + localStep["name"] = step.SyntheticsAPIWaitStep.GetName() + localStep["subtype"] = step.SyntheticsAPIWaitStep.GetSubtype() + localStep["value"] = step.SyntheticsAPIWaitStep.GetValue() } localSteps[i] = localStep diff --git a/datadog/tests/resource_datadog_synthetics_test_test.go b/datadog/tests/resource_datadog_synthetics_test_test.go index 8918457c37..74b5cc89eb 100644 --- a/datadog/tests/resource_datadog_synthetics_test_test.go +++ b/datadog/tests/resource_datadog_synthetics_test_test.go @@ -4604,6 +4604,12 @@ func createSyntheticsMultistepAPITest(ctx context.Context, accProvider func() (* "datadog_synthetics_test.multi", "api_step.3.request_basicauth.0.username", "username"), resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.3.request_basicauth.0.password", "password"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.multi", "api_step.4.name", "Wait step"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.multi", "api_step.4.type", "wait"), + resource.TestCheckResourceAttr( + "datadog_synthetics_test.multi", "api_step.4.value", "5"), resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "config_variable.0.type", "global"), resource.TestCheckResourceAttr( @@ -4790,6 +4796,12 @@ resource "datadog_synthetics_test" "multi" { target = "200" } } + + api_step { + name = "Wait step" + subtype = "wait" + value = 5 + } } `, testName, variableName) } From 7c45ab7db5aac5659c71c24cbe6f113e220e2139 Mon Sep 17 00:00:00 2001 From: Teodor Todorov Date: Tue, 2 Jul 2024 17:55:35 +0200 Subject: [PATCH 2/3] add some fixes and update cassettes --- datadog/resource_datadog_synthetics_test_.go | 8 ++- ...dogSyntheticsTestMultistepApi_Basic.freeze | 2 +- ...tadogSyntheticsTestMultistepApi_Basic.yaml | 70 +++++++++---------- .../resource_datadog_synthetics_test_test.go | 4 +- go.mod | 2 +- go.sum | 4 +- 6 files changed, 47 insertions(+), 43 deletions(-) diff --git a/datadog/resource_datadog_synthetics_test_.go b/datadog/resource_datadog_synthetics_test_.go index 89a903e733..a56f58d38e 100644 --- a/datadog/resource_datadog_synthetics_test_.go +++ b/datadog/resource_datadog_synthetics_test_.go @@ -1682,7 +1682,10 @@ func buildSyntheticsAPITestStruct(d *schema.ResourceData) *datadogV1.SyntheticsA step := datadogV1.SyntheticsAPIStep{} stepMap := s.(map[string]interface{}) - if step.SyntheticsAPITestStep != nil { + stepSubtype := stepMap["subtype"].(string) + + if stepSubtype == "" || stepSubtype == "http" || stepSubtype == "grpc" { + step.SyntheticsAPITestStep = datadogV1.NewSyntheticsAPITestStepWithDefaults() step.SyntheticsAPITestStep.SetName(stepMap["name"].(string)) step.SyntheticsAPITestStep.SetSubtype(datadogV1.SyntheticsAPITestStepSubtype(stepMap["subtype"].(string))) @@ -1732,7 +1735,8 @@ func buildSyntheticsAPITestStruct(d *schema.ResourceData) *datadogV1.SyntheticsA } step.SyntheticsAPITestStep.SetRetry(optionsRetry) } - } else if step.SyntheticsAPIWaitStep != nil { + } else if stepSubtype == "wait" { + step.SyntheticsAPIWaitStep = datadogV1.NewSyntheticsAPIWaitStepWithDefaults() step.SyntheticsAPIWaitStep.SetName(stepMap["name"].(string)) step.SyntheticsAPIWaitStep.SetSubtype(datadogV1.SyntheticsAPIWaitStepSubtype(stepMap["subtype"].(string))) step.SyntheticsAPIWaitStep.SetValue(int32(stepMap["value"].(int))) diff --git a/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze b/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze index 2464ce3911..a03ed814a4 100644 --- a/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze +++ b/datadog/tests/cassettes/TestAccDatadogSyntheticsTestMultistepApi_Basic.freeze @@ -1 +1 @@ -2024-06-13T11:39:35.035141+02:00 \ No newline at end of file +2024-07-02T17:53:32.710488+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 75e218350b..fbc0077fdd 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_1718271575","tags":["foo:bar","baz"],"value":{"secure":false,"value":"variable-value"}} + {"description":"a global variable","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1719935612","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":"b436e390-aa66-40c2-9e1e-d8a84148bbca","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1718271575","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"secure":false,"value":"variable-value"}} + {"id":"67173d60-741f-4429-aaf4-c040bc927004","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1719935612","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"last_error":null,"value":{"secure":false,"value":"variable-value"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 453.549125ms + duration: 463.411917ms - 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/b436e390-aa66-40c2-9e1e-d8a84148bbca + url: https://api.datadoghq.com/api/v1/synthetics/variables/67173d60-741f-4429-aaf4-c040bc927004 method: GET response: proto: HTTP/1.1 @@ -67,13 +67,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1718271575","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-06-13T09:39:38.223020+00:00","modified_at":"2024-06-13T09:39:38.223020+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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":"67173d60-741f-4429-aaf4-c040bc927004","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1719935612","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-07-02T15:53:36.188116+00:00","modified_at":"2024-07-02T15:53:36.188116+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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.291708ms + duration: 158.313292ms - 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/b436e390-aa66-40c2-9e1e-d8a84148bbca + url: https://api.datadoghq.com/api/v1/synthetics/variables/67173d60-741f-4429-aaf4-c040bc927004 method: GET response: proto: HTTP/1.1 @@ -102,26 +102,26 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1718271575","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-06-13T09:39:38.223020+00:00","modified_at":"2024-06-13T09:39:38.223020+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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":"67173d60-741f-4429-aaf4-c040bc927004","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1719935612","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-07-02T15:53:36.188116+00:00","modified_at":"2024-07-02T15:53:36.188116+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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.198083ms + duration: 174.401ms - id: 3 request: proto: HTTP/1.1 proto_major: 1 proto_minor: 1 - content_length: 3281 + content_length: 3329 transfer_encoding: [] trailer: {} host: api.datadoghq.com remote_addr: "" request_uri: "" body: | - {"config":{"assertions":[],"configVariables":[{"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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"},"body":"","follow_redirects":true,"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"},"body":"","follow_redirects":true,"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"}]},"locations":["aws:eu-central-1"],"message":"Notify @datadog.user","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1718271575","options":{"min_location_failed":1,"tick_every":900},"status":"paused","subtype":"multi","tags":["multistep"],"type":"api"} + {"config":{"assertions":[],"configVariables":[{"id":"67173d60-741f-4429-aaf4-c040bc927004","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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"},"body":"","follow_redirects":true,"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"},"body":"","follow_redirects":true,"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http"},{"name":"Wait step","subtype":"wait","value":5}]},"locations":["aws:eu-central-1"],"message":"Notify @datadog.user","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1719935612","options":{"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":"gqy-ktq-z8p","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1718271575","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-06-13T09:39:39.023581+00:00","modified_at":"2024-06-13T09:39:39.023581+00:00","config":{"assertions":[],"configVariables":[{"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"hse-jkt-4cz"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"drt-bce-ycv"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"w9k-fiq-8sw"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"6uk-w3y-an4"}]},"message":"Notify @datadog.user","options":{"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":147019685,"org_id":321813,"modified_by":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gt8-6gc-j6y","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1719935612","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-07-02T15:53:36.942312+00:00","modified_at":"2024-07-02T15:53:36.942312+00:00","config":{"assertions":[],"configVariables":[{"id":"67173d60-741f-4429-aaf4-c040bc927004","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"c7i-mab-uyd"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"arf-4jg-sf6"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"i76-47w-vw3"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"jwc-zj6-fy3"},{"name":"Wait step","subtype":"wait","value":5,"id":"rwy-ym4-te9"}]},"message":"Notify @datadog.user","options":{"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":148385611,"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: 443.390084ms + duration: 569.658542ms - 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/gqy-ktq-z8p + url: https://api.datadoghq.com/api/v1/synthetics/tests/api/gt8-6gc-j6y method: GET response: proto: HTTP/1.1 @@ -175,13 +175,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"gqy-ktq-z8p","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1718271575","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-06-13T09:39:39.023581+00:00","modified_at":"2024-06-13T09:39:39.023581+00:00","config":{"assertions":[],"configVariables":[{"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"hse-jkt-4cz"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"drt-bce-ycv"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"w9k-fiq-8sw"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"6uk-w3y-an4"}]},"message":"Notify @datadog.user","options":{"min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":147019685,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gt8-6gc-j6y","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1719935612","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-07-02T15:53:36.942312+00:00","modified_at":"2024-07-02T15:53:36.942312+00:00","config":{"assertions":[],"configVariables":[{"id":"67173d60-741f-4429-aaf4-c040bc927004","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"c7i-mab-uyd"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"arf-4jg-sf6"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"i76-47w-vw3"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"jwc-zj6-fy3"},{"name":"Wait step","subtype":"wait","value":5,"id":"rwy-ym4-te9"}]},"message":"Notify @datadog.user","options":{"min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":148385611,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 162.900625ms + duration: 176.023ms - 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/b436e390-aa66-40c2-9e1e-d8a84148bbca + url: https://api.datadoghq.com/api/v1/synthetics/variables/67173d60-741f-4429-aaf4-c040bc927004 method: GET response: proto: HTTP/1.1 @@ -210,13 +210,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1718271575","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-06-13T09:39:38.223020+00:00","modified_at":"2024-06-13T09:39:38.223020+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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":"67173d60-741f-4429-aaf4-c040bc927004","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1719935612","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-07-02T15:53:36.188116+00:00","modified_at":"2024-07-02T15:53:36.188116+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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: 156.875125ms + duration: 164.199625ms - 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/b436e390-aa66-40c2-9e1e-d8a84148bbca + url: https://api.datadoghq.com/api/v1/synthetics/variables/67173d60-741f-4429-aaf4-c040bc927004 method: GET response: proto: HTTP/1.1 @@ -245,13 +245,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1718271575","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-06-13T09:39:38.223020+00:00","modified_at":"2024-06-13T09:39:38.223020+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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":"67173d60-741f-4429-aaf4-c040bc927004","name":"TF_TESTACCDATADOGSYNTHETICSTESTMULTISTEPAPI_BASIC_LOCAL_1719935612","description":"a global variable","type":"variable","tags":["foo:bar","baz"],"created_at":"2024-07-02T15:53:36.188116+00:00","modified_at":"2024-07-02T15:53:36.188116+00:00","parse_test_public_id":null,"parse_test_name":null,"parse_test_options":null,"parse_test_extracted_at":null,"is_totp":null,"is_fido":null,"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: 149.783209ms + duration: 173.820583ms - 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/gqy-ktq-z8p + url: https://api.datadoghq.com/api/v1/synthetics/tests/gt8-6gc-j6y method: GET response: proto: HTTP/1.1 @@ -280,13 +280,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"gqy-ktq-z8p","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1718271575","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-06-13T09:39:39.023581+00:00","modified_at":"2024-06-13T09:39:39.023581+00:00","config":{"assertions":[],"configVariables":[{"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"hse-jkt-4cz"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"drt-bce-ycv"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"w9k-fiq-8sw"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"6uk-w3y-an4"}]},"message":"Notify @datadog.user","options":{"min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":147019685,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gt8-6gc-j6y","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1719935612","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-07-02T15:53:36.942312+00:00","modified_at":"2024-07-02T15:53:36.942312+00:00","config":{"assertions":[],"configVariables":[{"id":"67173d60-741f-4429-aaf4-c040bc927004","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"c7i-mab-uyd"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"arf-4jg-sf6"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"i76-47w-vw3"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"jwc-zj6-fy3"},{"name":"Wait step","subtype":"wait","value":5,"id":"rwy-ym4-te9"}]},"message":"Notify @datadog.user","options":{"min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":148385611,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 153.642375ms + duration: 163.805792ms - 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/gqy-ktq-z8p + url: https://api.datadoghq.com/api/v1/synthetics/tests/api/gt8-6gc-j6y method: GET response: proto: HTTP/1.1 @@ -315,13 +315,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"public_id":"gqy-ktq-z8p","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1718271575","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-06-13T09:39:39.023581+00:00","modified_at":"2024-06-13T09:39:39.023581+00:00","config":{"assertions":[],"configVariables":[{"id":"b436e390-aa66-40c2-9e1e-d8a84148bbca","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"hse-jkt-4cz"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"drt-bce-ycv"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"w9k-fiq-8sw"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"6uk-w3y-an4"}]},"message":"Notify @datadog.user","options":{"min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":147019685,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} + {"public_id":"gt8-6gc-j6y","name":"tf-TestAccDatadogSyntheticsTestMultistepApi_Basic-local-1719935612","status":"paused","type":"api","tags":["multistep"],"created_at":"2024-07-02T15:53:36.942312+00:00","modified_at":"2024-07-02T15:53:36.942312+00:00","config":{"assertions":[],"configVariables":[{"id":"67173d60-741f-4429-aaf4-c040bc927004","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":[{"field":"content-length","name":"VAR_EXTRACT","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":"GET","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":"c7i-mab-uyd"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"arf-4jg-sf6"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"i76-47w-vw3"},{"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"},"body":"","follow_redirects":true,"method":"GET","noSavingResponseBody":false,"persistCookies":false,"timeout":30,"url":"https://docs.datadoghq.com"},"subtype":"http","id":"jwc-zj6-fy3"},{"name":"Wait step","subtype":"wait","value":5,"id":"rwy-ym4-te9"}]},"message":"Notify @datadog.user","options":{"min_location_failed":1,"tick_every":900},"locations":["aws:eu-central-1"],"subtype":"multi","monitor_id":148385611,"creator":{"name":null,"handle":"frog@datadoghq.com","email":"frog@datadoghq.com"}} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 160.7345ms + duration: 166.627583ms - id: 9 request: proto: HTTP/1.1 @@ -334,7 +334,7 @@ interactions: remote_addr: "" request_uri: "" body: | - {"public_ids":["gqy-ktq-z8p"]} + {"public_ids":["gt8-6gc-j6y"]} form: {} headers: Accept: @@ -353,13 +353,13 @@ interactions: content_length: -1 uncompressed: true body: | - {"deleted_tests":[{"public_id":"gqy-ktq-z8p","deleted_at":"2024-06-13T09:39:41.833578+00:00"}]} + {"deleted_tests":[{"public_id":"gt8-6gc-j6y","deleted_at":"2024-07-02T15:53:40.174932+00:00"}]} headers: Content-Type: - application/json status: 200 OK code: 200 - duration: 695.785291ms + duration: 1.301556167s - id: 10 request: proto: HTTP/1.1 @@ -376,7 +376,7 @@ interactions: headers: Accept: - '*/*' - url: https://api.datadoghq.com/api/v1/synthetics/variables/b436e390-aa66-40c2-9e1e-d8a84148bbca + url: https://api.datadoghq.com/api/v1/synthetics/variables/67173d60-741f-4429-aaf4-c040bc927004 method: DELETE response: proto: HTTP/1.1 @@ -392,7 +392,7 @@ interactions: - text/html; charset=utf-8 status: 200 OK code: 200 - duration: 180.336916ms + duration: 294.301792ms - 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/gqy-ktq-z8p + url: https://api.datadoghq.com/api/v1/synthetics/tests/gt8-6gc-j6y method: GET response: proto: HTTP/1.1 @@ -426,4 +426,4 @@ interactions: - application/json status: 404 Not Found code: 404 - duration: 127.544083ms + duration: 137.209334ms diff --git a/datadog/tests/resource_datadog_synthetics_test_test.go b/datadog/tests/resource_datadog_synthetics_test_test.go index 74b5cc89eb..7c02a24348 100644 --- a/datadog/tests/resource_datadog_synthetics_test_test.go +++ b/datadog/tests/resource_datadog_synthetics_test_test.go @@ -4447,7 +4447,7 @@ func createSyntheticsMultistepAPITest(ctx context.Context, accProvider func() (* resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "status", "paused"), resource.TestCheckResourceAttr( - "datadog_synthetics_test.multi", "api_step.#", "4"), + "datadog_synthetics_test.multi", "api_step.#", "5"), resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.0.name", "First api step"), resource.TestCheckResourceAttr( @@ -4607,7 +4607,7 @@ func createSyntheticsMultistepAPITest(ctx context.Context, accProvider func() (* resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.4.name", "Wait step"), resource.TestCheckResourceAttr( - "datadog_synthetics_test.multi", "api_step.4.type", "wait"), + "datadog_synthetics_test.multi", "api_step.4.subtype", "wait"), resource.TestCheckResourceAttr( "datadog_synthetics_test.multi", "api_step.4.value", "5"), resource.TestCheckResourceAttr( diff --git a/go.mod b/go.mod index 7a03cbe0b3..061005f250 100644 --- a/go.mod +++ b/go.mod @@ -1,7 +1,7 @@ module github.com/terraform-providers/terraform-provider-datadog require ( - github.com/DataDog/datadog-api-client-go/v2 v2.26.1-0.20240618193852-3e8041dde616 + github.com/DataDog/datadog-api-client-go/v2 v2.27.1-0.20240701174731-9480122efd1b github.com/DataDog/dd-sdk-go-testing v0.0.0-20211116174033-1cd082e322ad github.com/google/go-cmp v0.5.9 github.com/google/uuid v1.5.0 diff --git a/go.sum b/go.sum index 9de8c5b05c..e7055c3dab 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/DataDog/datadog-api-client-go/v2 v2.26.1-0.20240618193852-3e8041dde616 h1:OhCEkIMEn+oseqT63gwslk110qUIYvIp46fmgYa0wK4= -github.com/DataDog/datadog-api-client-go/v2 v2.26.1-0.20240618193852-3e8041dde616/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= +github.com/DataDog/datadog-api-client-go/v2 v2.27.1-0.20240701174731-9480122efd1b h1:ssoDSdT9nLHw3qrEsIRaiaZU0i8G3KjoSeN5PZEFiHQ= +github.com/DataDog/datadog-api-client-go/v2 v2.27.1-0.20240701174731-9480122efd1b/go.mod h1:QKOu6vscsh87fMY1lHfLEmNSunyXImj8BUaUWJXOehc= github.com/DataDog/datadog-go v4.4.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q= github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= From 188074265e4647a57146373938f3d9178808d129 Mon Sep 17 00:00:00 2001 From: Teodor Todorov Date: Tue, 2 Jul 2024 18:06:13 +0200 Subject: [PATCH 3/3] update docs --- docs/resources/synthetics_test.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/resources/synthetics_test.md b/docs/resources/synthetics_test.md index dd786d4b46..1e7e1ffd3f 100644 --- a/docs/resources/synthetics_test.md +++ b/docs/resources/synthetics_test.md @@ -454,7 +454,7 @@ resource "datadog_synthetics_test" "grpc" { ### Optional -- `api_step` (Block List) Steps for multistep api tests (see [below for nested schema](#nestedblock--api_step)) +- `api_step` (Block List) Steps for multi-step api tests (see [below for nested schema](#nestedblock--api_step)) - `assertion` (Block List) Assertions used for the test. Multiple `assertion` blocks are allowed with the structure below. (see [below for nested schema](#nestedblock--assertion)) - `browser_step` (Block List) Steps for browser tests. (see [below for nested schema](#nestedblock--browser_step)) - `browser_variable` (Block List) Variables used for a browser test steps. Multiple `variable` blocks are allowed with the structure below. (see [below for nested schema](#nestedblock--browser_variable)) @@ -501,7 +501,8 @@ Optional: - `request_proxy` (Block List, Max: 1) The proxy to perform the test. (see [below for nested schema](#nestedblock--api_step--request_proxy)) - `request_query` (Map of String) Query arguments name and value map. - `retry` (Block List, Max: 1) (see [below for nested schema](#nestedblock--api_step--retry)) -- `subtype` (String) The subtype of the Synthetic multistep API test step. Valid values are `http`, `grpc`. Defaults to `"http"`. +- `subtype` (String) The subtype of the Synthetic multi-step API test step. Valid values are `http`, `grpc`, `wait`. Defaults to `"http"`. +- `value` (Number) The time to wait in seconds. Minimum value: 0. Maximum value: 180. ### Nested Schema for `api_step.assertion`