diff --git a/datadog/resource_datadog_synthetics_test_.go b/datadog/resource_datadog_synthetics_test_.go index 342daeffc..5956bf809 100644 --- a/datadog/resource_datadog_synthetics_test_.go +++ b/datadog/resource_datadog_synthetics_test_.go @@ -1002,6 +1002,16 @@ func syntheticsTestBrowserStep() *schema.Schema { Type: schema.TypeBool, Optional: true, }, + "always_execute": { + Description: "Determines whether or not to always execute this step even if the previous step failed or was skipped.", + Type: schema.TypeBool, + Optional: true, + }, + "exit_if_succeed": { + Description: "Determines whether or not to exit the test if the step succeeds.", + Type: schema.TypeBool, + Optional: true, + }, "is_critical": { Description: "Determines whether or not to consider the entire test as failed if this step fails. Can be used only if `allow_failure` is `true`.", Type: schema.TypeBool, @@ -1643,7 +1653,12 @@ func updateSyntheticsBrowserTestLocalState(d *schema.ResourceData, syntheticsTes if allowFailure, ok := step.GetAllowFailureOk(); ok { localStep["allow_failure"] = allowFailure } - + if alwaysExecute, ok := step.GetAlwaysExecuteOk(); ok { + localStep["always_execute"] = alwaysExecute + } + if exitIfSucceed, ok := step.GetExitIfSucceedOk(); ok { + localStep["exit_if_succeed"] = exitIfSucceed + } if isCritical, ok := step.GetIsCriticalOk(); ok { localStep["is_critical"] = isCritical } @@ -2312,6 +2327,8 @@ func buildDatadogSyntheticsBrowserTest(d *schema.ResourceData) *datadogV1.Synthe step.SetName(stepMap["name"].(string)) step.SetType(datadogV1.SyntheticsStepType(stepMap["type"].(string))) step.SetAllowFailure(stepMap["allow_failure"].(bool)) + step.SetAlwaysExecute(stepMap["always_execute"].(bool)) + step.SetExitIfSucceed(stepMap["exit_if_succeed"].(bool)) step.SetIsCritical(stepMap["is_critical"].(bool)) step.SetTimeout(int64(stepMap["timeout"].(int))) step.SetNoScreenshot(stepMap["no_screenshot"].(bool)) diff --git a/go.mod b/go.mod index 0929788fd..b3cbf1b85 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.31.1-0.20241031172113-8704b619424c + github.com/DataDog/datadog-api-client-go/v2 v2.31.1-0.20241105210323-3f1f0b870f38 github.com/DataDog/dd-sdk-go-testing v0.0.0-20211116174033-1cd082e322ad github.com/Masterminds/semver/v3 v3.1.1 github.com/google/go-cmp v0.5.9 diff --git a/go.sum b/go.sum index b3e2348a1..6bb416e2d 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.31.1-0.20241031172113-8704b619424c h1:FRgVhkpYHmy6VHlhsWDhOZciWe1S+aaDCp4KYmsaeOg= -github.com/DataDog/datadog-api-client-go/v2 v2.31.1-0.20241031172113-8704b619424c/go.mod h1:d3tOEgUd2kfsr9uuHQdY+nXrWp4uikgTgVCPdKNK30U= +github.com/DataDog/datadog-api-client-go/v2 v2.31.1-0.20241105210323-3f1f0b870f38 h1:VfCBLSmgFVCnL6UaFj31WWjxfHiugb053MOV4zztA0U= +github.com/DataDog/datadog-api-client-go/v2 v2.31.1-0.20241105210323-3f1f0b870f38/go.mod h1:d3tOEgUd2kfsr9uuHQdY+nXrWp4uikgTgVCPdKNK30U= 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=