diff --git a/synthetics/data_source_apicheck_v2.go b/synthetics/data_source_apicheck_v2.go index d4edddc..676432c 100644 --- a/synthetics/data_source_apicheck_v2.go +++ b/synthetics/data_source_apicheck_v2.go @@ -270,6 +270,10 @@ func dataSourceApiCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/data_source_browsercheck_v2.go b/synthetics/data_source_browsercheck_v2.go index 17514fc..6ff9525 100644 --- a/synthetics/data_source_browsercheck_v2.go +++ b/synthetics/data_source_browsercheck_v2.go @@ -397,6 +397,10 @@ func dataSourceBrowserCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/data_source_httpcheck_v2.go b/synthetics/data_source_httpcheck_v2.go index 2b46d8b..b5fd7ce 100644 --- a/synthetics/data_source_httpcheck_v2.go +++ b/synthetics/data_source_httpcheck_v2.go @@ -175,6 +175,10 @@ func dataSourceHttpCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/data_source_portcheck_v2.go b/synthetics/data_source_portcheck_v2.go index 15ce570..f4ceadd 100644 --- a/synthetics/data_source_portcheck_v2.go +++ b/synthetics/data_source_portcheck_v2.go @@ -101,6 +101,10 @@ func dataSourcePortCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/resource_api_check_v2.go b/synthetics/resource_api_check_v2.go index 1961240..a6ced56 100644 --- a/synthetics/resource_api_check_v2.go +++ b/synthetics/resource_api_check_v2.go @@ -212,6 +212,10 @@ func resourceApiCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/resource_api_check_v2_test.go b/synthetics/resource_api_check_v2_test.go index 48d4a3d..f3918de 100644 --- a/synthetics/resource_api_check_v2_test.go +++ b/synthetics/resource_api_check_v2_test.go @@ -30,6 +30,7 @@ resource "synthetics_create_api_check_v2" "api_v2_foo_check" { location_ids = ["aws-us-east-1"] name = "2 Terraform-Api V2 Acceptance Checkaroo" scheduling_strategy = "round_robin" + automatic_retries = 1 custom_properties { key = "key" value = "value" @@ -123,6 +124,7 @@ resource "synthetics_create_api_check_v2" "api_v2_foo_check" { location_ids = ["aws-us-west-1"] name = "2 Terraform-Api V2 Acceptance Checkaroo Updated" scheduling_strategy = "concurrent" + automatic_retries = 0 custom_properties { key = "beepkey" value = "boopvalue" @@ -220,6 +222,7 @@ func TestAccCreateUpdateApiCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.active", "true"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.device_id", "1"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.frequency", "5"), + resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.automatic_retries", "1"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.location_ids.0", "aws-us-east-1"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.name", "2 Terraform-Api V2 Acceptance Checkaroo"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.scheduling_strategy", "round_robin"), @@ -291,6 +294,7 @@ func TestAccCreateUpdateApiCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.active", "false"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.device_id", "2"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.frequency", "15"), + resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.automatic_retries", "0"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.location_ids.0", "aws-us-west-1"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.name", "2 Terraform-Api V2 Acceptance Checkaroo Updated"), resource.TestCheckResourceAttr("synthetics_create_api_check_v2.api_v2_foo_check", "test.0.scheduling_strategy", "concurrent"), diff --git a/synthetics/resource_browser_check_v2.go b/synthetics/resource_browser_check_v2.go index b51cba1..c238509 100644 --- a/synthetics/resource_browser_check_v2.go +++ b/synthetics/resource_browser_check_v2.go @@ -281,6 +281,10 @@ func resourceBrowserCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/resource_browser_check_v2_test.go b/synthetics/resource_browser_check_v2_test.go index 75db377..ddc46b3 100644 --- a/synthetics/resource_browser_check_v2_test.go +++ b/synthetics/resource_browser_check_v2_test.go @@ -28,6 +28,7 @@ resource "synthetics_create_browser_check_v2" "browser_v2_foo_check" { device_id = 1 frequency = 5 location_ids = ["aws-us-east-1"] + automatic_retries = 1 name = "01-acceptance-Terraform-Browser-V2" scheduling_strategy = "round_robin" custom_properties { @@ -133,6 +134,7 @@ resource "synthetics_create_browser_check_v2" "browser_v2_foo_check" { device_id = 2 frequency = 15 location_ids = ["aws-us-west-1"] + automatic_retries = 0 name = "01-acceptance-updated-Terraform-Browser-V2" scheduling_strategy = "concurrent" custom_properties { @@ -261,6 +263,7 @@ func TestAccCreateUpdateBrowserCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.active", "true"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.device_id", "1"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.frequency", "5"), + resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.automatic_retries", "1"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.location_ids.0", "aws-us-east-1"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.name", "01-acceptance-Terraform-Browser-V2"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.scheduling_strategy", "round_robin"), @@ -337,6 +340,7 @@ func TestAccCreateUpdateBrowserCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.active", "false"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.device_id", "2"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.frequency", "15"), + resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.automatic_retries", "0"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.location_ids.0", "aws-us-west-1"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.name", "01-acceptance-updated-Terraform-Browser-V2"), resource.TestCheckResourceAttr("synthetics_create_browser_check_v2.browser_v2_foo_check", "test.0.scheduling_strategy", "concurrent"), diff --git a/synthetics/resource_http_check_v2.go b/synthetics/resource_http_check_v2.go index 91da00e..2dd8985 100644 --- a/synthetics/resource_http_check_v2.go +++ b/synthetics/resource_http_check_v2.go @@ -186,6 +186,10 @@ func resourceHttpCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/resource_http_check_v2_test.go b/synthetics/resource_http_check_v2_test.go index d59d445..d68f08c 100644 --- a/synthetics/resource_http_check_v2_test.go +++ b/synthetics/resource_http_check_v2_test.go @@ -30,6 +30,7 @@ resource "synthetics_create_http_check_v2" "http_v2_foo_check" { name = "01-acceptance-Terraform-HTTP-V2" type = "http" url = "https://www.splunk.com" + automatic_retries = 1 scheduling_strategy = "round_robin" custom_properties { key = "key" @@ -75,6 +76,7 @@ resource "synthetics_create_http_check_v2" "http_v2_foo_check" { name = "01-acceptance-updated-Terraform-HTTP-V2" type = "http" url = "https://www.duckduckgo.com" + automatic_retries = 0 scheduling_strategy = "concurrent" custom_properties { key = "beepkey" @@ -123,6 +125,7 @@ func TestAccCreateUpdateHttpCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.#", "1"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.active", "true"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.frequency", "5"), + resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.automatic_retries", "1"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.location_ids.0", "aws-us-east-1"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.location_ids.1", "aws-us-west-1"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.name", "01-acceptance-Terraform-HTTP-V2"), @@ -164,6 +167,7 @@ func TestAccCreateUpdateHttpCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.#", "1"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.active", "false"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.frequency", "15"), + resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.automatic_retries", "0"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.location_ids.0", "aws-us-west-1"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.name", "01-acceptance-updated-Terraform-HTTP-V2"), resource.TestCheckResourceAttr("synthetics_create_http_check_v2.http_v2_foo_check", "test.0.type", "http"), diff --git a/synthetics/resource_port_check_v2.go b/synthetics/resource_port_check_v2.go index 2b7fa49..22c76bc 100644 --- a/synthetics/resource_port_check_v2.go +++ b/synthetics/resource_port_check_v2.go @@ -118,6 +118,10 @@ func resourcePortCheckV2() *schema.Resource { }, }, }, + "automatic_retries": { + Type: schema.TypeInt, + Computed: true, + }, }, }, }, diff --git a/synthetics/resource_port_check_v2_test.go b/synthetics/resource_port_check_v2_test.go index 0205c19..bea953c 100644 --- a/synthetics/resource_port_check_v2_test.go +++ b/synthetics/resource_port_check_v2_test.go @@ -27,6 +27,7 @@ resource "synthetics_create_port_check_v2" "port_v2_foo_check" { active = true frequency = 5 location_ids = ["aws-us-west-2", "aws-us-east-1"] + automatic_retries = 1 scheduling_strategy = "round_robin" custom_properties { key = "key" @@ -47,6 +48,7 @@ resource "synthetics_create_port_check_v2" "port_v2_foo_check" { active = false frequency = 15 location_ids = ["aws-us-east-1"] + automatic_retries = 0 scheduling_strategy = "concurrent" custom_properties { key = "beepkey" @@ -73,6 +75,7 @@ func TestAccCreateUpdatePortCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.#", "1"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.active", "true"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.frequency", "5"), + resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.automatic_retries", "1"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.location_ids.0", "aws-us-west-2"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.location_ids.1", "aws-us-east-1"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.scheduling_strategy", "round_robin"), @@ -97,6 +100,7 @@ func TestAccCreateUpdatePortCheckV2(t *testing.T) { resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.#", "1"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.active", "false"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.frequency", "15"), + resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.automatic_retries", "0"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.location_ids.0", "aws-us-east-1"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.scheduling_strategy", "concurrent"), resource.TestCheckResourceAttr("synthetics_create_port_check_v2.port_v2_foo_check", "test.0.custom_properties.0.key", "beepkey"), diff --git a/synthetics/structures.go b/synthetics/structures.go index f2034ee..cc29ce5 100644 --- a/synthetics/structures.go +++ b/synthetics/structures.go @@ -48,6 +48,7 @@ func flattenApiV2Read(checkApiV2 *sc2.ApiCheckV2Response) []interface{} { apiV2 := make(map[string]interface{}) apiV2["active"] = checkApiV2.Test.Active + apiV2["automatic_retries"] = checkApiV2.Test.Automaticretries if checkApiV2.Test.Frequency != 0 { apiV2["frequency"] = checkApiV2.Test.Frequency @@ -81,6 +82,7 @@ func flattenApiV2Data(checkApiV2 *sc2.ApiCheckV2Response) []interface{} { apiV2 := make(map[string]interface{}) apiV2["active"] = checkApiV2.Test.Active + apiV2["automatic_retries"] = checkApiV2.Test.Automaticretries if checkApiV2.Test.Createdat.IsZero() { } else { @@ -303,6 +305,7 @@ func flattenBrowserV2Read(checkBrowserV2 *sc2.BrowserCheckV2Response) []interfac browserV2 := make(map[string]interface{}) browserV2["active"] = checkBrowserV2.Test.Active + browserV2["automatic_retries"] = checkBrowserV2.Test.Automaticretries browserV2["device_id"] = checkBrowserV2.Test.Device.ID @@ -339,6 +342,7 @@ func flattenBrowserV2Data(checkBrowserV2 *sc2.BrowserCheckV2Response) []interfac browserV2 := make(map[string]interface{}) browserV2["active"] = checkBrowserV2.Test.Active + browserV2["automatic_retries"] = checkBrowserV2.Test.Automaticretries if checkBrowserV2.Test.Createdat.IsZero() { } else { @@ -401,6 +405,7 @@ func flattenHttpV2Read(checkHttpV2 *sc2.HttpCheckV2Response) []interface{} { } httpV2["active"] = checkHttpV2.Test.Active + httpV2["automatic_retries"] = checkHttpV2.Test.Automaticretries if checkHttpV2.Test.Frequency != 0 { httpV2["frequency"] = checkHttpV2.Test.Frequency @@ -459,6 +464,7 @@ func flattenHttpV2Data(checkHttpV2 *sc2.HttpCheckV2Response) []interface{} { } httpV2["active"] = checkHttpV2.Test.Active + httpV2["automatic_retries"] = checkHttpV2.Test.Automaticretries if checkHttpV2.Test.Frequency != 0 { httpV2["frequency"] = checkHttpV2.Test.Frequency @@ -527,6 +533,7 @@ func flattenPortCheckV2Read(checkPortV2 *sc2.PortCheckV2Response) []interface{} } portV2["active"] = checkPortV2.Test.Active + portV2["automatic_retries"] = checkPortV2.Test.Automaticretries if checkPortV2.Test.Frequency != 0 { portV2["frequency"] = checkPortV2.Test.Frequency @@ -575,6 +582,7 @@ func flattenPortCheckV2Data(checkPortV2 *sc2.PortCheckV2Response) []interface{} } portV2["active"] = checkPortV2.Test.Active + portV2["automatic_retries"] = checkPortV2.Test.Automaticretries if checkPortV2.Test.Frequency != 0 { portV2["frequency"] = checkPortV2.Test.Frequency @@ -1115,6 +1123,7 @@ func buildApiV2Data(d *schema.ResourceData) sc2.ApiCheckV2Input { apiv2.Test.Active = api["active"].(bool) apiv2.Test.Deviceid = api["device_id"].(int) apiv2.Test.Frequency = api["frequency"].(int) + apiv2.Test.Automaticretries = api["automatic_retries"].(int) apiv2.Test.Locationids = buildLocationIdData(api["location_ids"].([]interface{})) apiv2.Test.Name = api["name"].(string) apiv2.Test.Requests = buildRequestsData(api["requests"].(([]interface{}))) @@ -1135,6 +1144,7 @@ func buildBrowserV2Data(d *schema.ResourceData) sc2.BrowserCheckV2Input { browserv2.Test.Active = browser["active"].(bool) browserv2.Test.DeviceID = browser["device_id"].(int) browserv2.Test.Frequency = browser["frequency"].(int) + browserv2.Test.Automaticretries = browser["automatic_retries"].(int) browserv2.Test.LocationIds = buildLocationIdData(browser["location_ids"].([]interface{})) browserv2.Test.Name = browser["name"].(string) browserv2.Test.Transactions = buildBusinessTransactionsData(browser["transactions"].([]interface{})) @@ -1159,6 +1169,7 @@ func buildHttpV2Data(d *schema.ResourceData) sc2.HttpCheckV2Input { httpv2.Test.URL = http["url"].(string) httpv2.Test.LocationIds = buildLocationIdData(http["location_ids"].([]interface{})) httpv2.Test.Frequency = http["frequency"].(int) + httpv2.Test.Automaticretries = http["automatic_retries"].(int) httpv2.Test.SchedulingStrategy = http["scheduling_strategy"].(string) httpv2.Test.Active = http["active"].(bool) httpv2.Test.RequestMethod = http["request_method"].(string) @@ -1191,6 +1202,7 @@ func buildPortCheckV2Data(d *schema.ResourceData) sc2.PortCheckV2Input { portv2.Test.Host = port["host"].(string) portv2.Test.LocationIds = buildLocationIdData(port["location_ids"].([]interface{})) portv2.Test.Frequency = port["frequency"].(int) + portv2.Test.Automaticretries = port["automatic_retries"].(int) portv2.Test.SchedulingStrategy = port["scheduling_strategy"].(string) portv2.Test.Active = port["active"].(bool) portv2.Test.Customproperties = buildCustomPropertiesData(port["custom_properties"].(*schema.Set))