From 280872aa91c98a0c37ba6ce267ae3c2ab6327d62 Mon Sep 17 00:00:00 2001 From: Marin Binzari Date: Mon, 8 Jul 2024 22:33:56 +0300 Subject: [PATCH 1/5] Support for additional settings in container apps for liveness_probe, startup_probe and readiness_probe #25457 --- .../container_app_resource_test.go | 4 + .../containerapps/helpers/container_apps.go | 84 ++++++++++++++++--- 2 files changed, 76 insertions(+), 12 deletions(-) diff --git a/internal/services/containerapps/container_app_resource_test.go b/internal/services/containerapps/container_app_resource_test.go index 7edc43cf37aa..8473dc82bdd2 100644 --- a/internal/services/containerapps/container_app_resource_test.go +++ b/internal/services/containerapps/container_app_resource_test.go @@ -2199,6 +2199,7 @@ resource "azurerm_container_app" "test" { transport = "HTTP" port = 5000 path = "/uptime" + initial_delay = 5 timeout = 2 failure_count_threshold = 1 success_count_threshold = 1 @@ -2222,13 +2223,16 @@ resource "azurerm_container_app" "test" { initial_delay = 5 timeout = 2 failure_count_threshold = 3 + success_count_threshold = 1 } startup_probe { transport = "TCP" port = 5000 + initial_delay = 5 timeout = 5 failure_count_threshold = 1 + success_count_threshold = 1 } volume_mounts { diff --git a/internal/services/containerapps/helpers/container_apps.go b/internal/services/containerapps/helpers/container_apps.go index e8e94961e5fd..5d57fad7d6f1 100644 --- a/internal/services/containerapps/helpers/container_apps.go +++ b/internal/services/containerapps/helpers/container_apps.go @@ -1734,6 +1734,7 @@ type ContainerAppReadinessProbe struct { Port int64 `tfschema:"port"` Path string `tfschema:"path"` Headers []HttpHeader `tfschema:"header"` + InitialDelay int64 `tfschema:"initial_delay"` Interval int64 `tfschema:"interval_seconds"` Timeout int64 `tfschema:"timeout"` FailureThreshold int64 `tfschema:"failure_count_threshold"` @@ -1799,6 +1800,14 @@ func ContainerAppReadinessProbeSchema() *pluginsdk.Schema { }, }, + "initial_delay": { + Type: pluginsdk.TypeInt, + Optional: true, + Default: 0, + ValidateFunc: validation.IntBetween(0, 60), + Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + }, + "interval_seconds": { Type: pluginsdk.TypeInt, Optional: true, @@ -1819,8 +1828,8 @@ func ContainerAppReadinessProbeSchema() *pluginsdk.Schema { Type: pluginsdk.TypeInt, Optional: true, Default: 3, - ValidateFunc: validation.IntBetween(1, 10), - Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.", + ValidateFunc: validation.IntBetween(1, 30), + Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", }, "success_count_threshold": { @@ -1885,6 +1894,12 @@ func ContainerAppReadinessProbeSchemaComputed() *pluginsdk.Schema { }, }, + "initial_delay": { + Type: pluginsdk.TypeInt, + Computed: true, + Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + }, + "interval_seconds": { Type: pluginsdk.TypeInt, Computed: true, @@ -1900,7 +1915,7 @@ func ContainerAppReadinessProbeSchemaComputed() *pluginsdk.Schema { "failure_count_threshold": { Type: pluginsdk.TypeInt, Computed: true, - Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.", + Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", }, "success_count_threshold": { @@ -2004,6 +2019,7 @@ type ContainerAppLivenessProbe struct { Interval int64 `tfschema:"interval_seconds"` Timeout int64 `tfschema:"timeout"` FailureThreshold int64 `tfschema:"failure_count_threshold"` + SuccessThreshold int64 `tfschema:"success_count_threshold"` TerminationGracePeriod int64 `tfschema:"termination_grace_period_seconds"` } @@ -2070,8 +2086,8 @@ func ContainerAppLivenessProbeSchema() *pluginsdk.Schema { Type: pluginsdk.TypeInt, Optional: true, Default: 1, - ValidateFunc: validation.IntBetween(1, 60), - Description: "The time in seconds to wait after the container has started before the probe is started.", + ValidateFunc: validation.IntBetween(0, 60), + Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `1` seconds.", }, "interval_seconds": { @@ -2094,8 +2110,16 @@ func ContainerAppLivenessProbeSchema() *pluginsdk.Schema { Type: pluginsdk.TypeInt, Optional: true, Default: 3, - ValidateFunc: validation.IntBetween(1, 10), - Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.", + ValidateFunc: validation.IntBetween(1, 30), + Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", + }, + + "success_count_threshold": { + Type: pluginsdk.TypeInt, + Optional: true, + Default: 1, + ValidateFunc: validation.IntBetween(1, 1), + Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to `1`. Must be `1` for liveness and startup Probes. Minimum value is `1`.", }, "termination_grace_period_seconds": { @@ -2161,7 +2185,7 @@ func ContainerAppLivenessProbeSchemaComputed() *pluginsdk.Schema { "initial_delay": { Type: pluginsdk.TypeInt, Computed: true, - Description: "The time in seconds to wait after the container has started before the probe is started.", + Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `1` seconds.", }, "interval_seconds": { @@ -2179,7 +2203,13 @@ func ContainerAppLivenessProbeSchemaComputed() *pluginsdk.Schema { "failure_count_threshold": { Type: pluginsdk.TypeInt, Computed: true, - Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.", + Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", + }, + + "success_count_threshold": { + Type: pluginsdk.TypeInt, + Computed: true, + Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to `1`. Must be `1` for liveness and startup Probes. Minimum value is `1`.", }, "termination_grace_period_seconds": { @@ -2279,9 +2309,11 @@ type ContainerAppStartupProbe struct { Port int64 `tfschema:"port"` Path string `tfschema:"path"` Headers []HttpHeader `tfschema:"header"` + InitialDelay int64 `tfschema:"initial_delay"` Interval int64 `tfschema:"interval_seconds"` Timeout int64 `tfschema:"timeout"` FailureThreshold int64 `tfschema:"failure_count_threshold"` + SuccessThreshold int64 `tfschema:"success_count_threshold"` TerminationGracePeriod int64 `tfschema:"termination_grace_period_seconds"` } @@ -2344,6 +2376,14 @@ func ContainerAppStartupProbeSchema() *pluginsdk.Schema { }, }, + "initial_delay": { + Type: pluginsdk.TypeInt, + Optional: true, + Default: 0, + ValidateFunc: validation.IntBetween(0, 60), + Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + }, + "interval_seconds": { Type: pluginsdk.TypeInt, Optional: true, @@ -2364,8 +2404,16 @@ func ContainerAppStartupProbeSchema() *pluginsdk.Schema { Type: pluginsdk.TypeInt, Optional: true, Default: 3, - ValidateFunc: validation.IntBetween(1, 10), - Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.", + ValidateFunc: validation.IntBetween(1, 30), + Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", + }, + + "success_count_threshold": { + Type: pluginsdk.TypeInt, + Optional: true, + Default: 1, + ValidateFunc: validation.IntBetween(1, 1), + Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to 1. Must be 1 for liveness and startup Probes. Minimum value is 1.", }, "termination_grace_period_seconds": { @@ -2424,6 +2472,12 @@ func ContainerAppStartupProbeSchemaComputed() *pluginsdk.Schema { }, }, + "initial_delay": { + Type: pluginsdk.TypeInt, + Computed: true, + Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + }, + "interval_seconds": { Type: pluginsdk.TypeInt, Computed: true, @@ -2439,7 +2493,13 @@ func ContainerAppStartupProbeSchemaComputed() *pluginsdk.Schema { "failure_count_threshold": { Type: pluginsdk.TypeInt, Computed: true, - Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`.", + Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", + }, + + "success_count_threshold": { + Type: pluginsdk.TypeInt, + Computed: true, + Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to 1. Must be 1 for liveness and startup Probes. Minimum value is 1.", }, "termination_grace_period_seconds": { From 174ca02664ac1a05f9cd0f8178619d97bc5cdbf9 Mon Sep 17 00:00:00 2001 From: Marin Binzari Date: Mon, 8 Jul 2024 22:44:34 +0300 Subject: [PATCH 2/5] add flatten / expand logic --- .../containerapps/helpers/container_apps.go | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/internal/services/containerapps/helpers/container_apps.go b/internal/services/containerapps/helpers/container_apps.go index 5d57fad7d6f1..ef5393478dc8 100644 --- a/internal/services/containerapps/helpers/container_apps.go +++ b/internal/services/containerapps/helpers/container_apps.go @@ -1931,11 +1931,12 @@ func ContainerAppReadinessProbeSchemaComputed() *pluginsdk.Schema { func expandContainerAppReadinessProbe(input ContainerAppReadinessProbe) containerapps.ContainerAppProbe { probeType := containerapps.TypeReadiness result := containerapps.ContainerAppProbe{ - Type: &probeType, - PeriodSeconds: pointer.To(input.Interval), - TimeoutSeconds: pointer.To(input.Timeout), - FailureThreshold: pointer.To(input.FailureThreshold), - SuccessThreshold: pointer.To(input.SuccessThreshold), + Type: &probeType, + InitialDelaySeconds: pointer.To(input.InitialDelay), + PeriodSeconds: pointer.To(input.Interval), + TimeoutSeconds: pointer.To(input.Timeout), + FailureThreshold: pointer.To(input.FailureThreshold), + SuccessThreshold: pointer.To(input.SuccessThreshold), } switch p := strings.ToUpper(input.Transport); p { @@ -1972,6 +1973,7 @@ func expandContainerAppReadinessProbe(input ContainerAppReadinessProbe) containe func flattenContainerAppReadinessProbe(input containerapps.ContainerAppProbe) []ContainerAppReadinessProbe { result := make([]ContainerAppReadinessProbe, 0) probe := ContainerAppReadinessProbe{ + InitialDelay: pointer.From(input.InitialDelay), Interval: pointer.From(input.PeriodSeconds), Timeout: pointer.From(input.TimeoutSeconds), FailureThreshold: pointer.From(input.FailureThreshold), @@ -2230,6 +2232,7 @@ func expandContainerAppLivenessProbe(input ContainerAppLivenessProbe) containera PeriodSeconds: pointer.To(input.Interval), TimeoutSeconds: pointer.To(input.Timeout), FailureThreshold: pointer.To(input.FailureThreshold), + SuccessThreshold: pointer.To(input.SuccessThreshold), } switch p := strings.ToUpper(input.Transport); p { @@ -2270,6 +2273,7 @@ func flattenContainerAppLivenessProbe(input containerapps.ContainerAppProbe) []C Interval: pointer.From(input.PeriodSeconds), Timeout: pointer.From(input.TimeoutSeconds), FailureThreshold: pointer.From(input.FailureThreshold), + SuccessThreshold: pointer.From(input.SuccessThreshold), TerminationGracePeriod: pointer.From(input.TerminationGracePeriodSeconds), } if httpGet := input.HTTPGet; httpGet != nil { @@ -2515,10 +2519,12 @@ func ContainerAppStartupProbeSchemaComputed() *pluginsdk.Schema { func expandContainerAppStartupProbe(input ContainerAppStartupProbe) containerapps.ContainerAppProbe { probeType := containerapps.TypeStartup result := containerapps.ContainerAppProbe{ - Type: &probeType, - PeriodSeconds: pointer.To(input.Interval), - TimeoutSeconds: pointer.To(input.Timeout), - FailureThreshold: pointer.To(input.FailureThreshold), + Type: &probeType, + InitialDelaySeconds: pointer.To(input.InitialDelay), + PeriodSeconds: pointer.To(input.Interval), + TimeoutSeconds: pointer.To(input.Timeout), + FailureThreshold: pointer.To(input.FailureThreshold), + SuccessThreshold: pointer.To(input.SuccessThreshold), } switch p := strings.ToUpper(input.Transport); p { @@ -2555,9 +2561,11 @@ func expandContainerAppStartupProbe(input ContainerAppStartupProbe) containerapp func flattenContainerAppStartupProbe(input containerapps.ContainerAppProbe) []ContainerAppStartupProbe { result := make([]ContainerAppStartupProbe, 0) probe := ContainerAppStartupProbe{ + InitialDelay: pointer.From(input.InitialDelaySeconds), Interval: pointer.From(input.PeriodSeconds), Timeout: pointer.From(input.TimeoutSeconds), FailureThreshold: pointer.From(input.FailureThreshold), + SuccessThreshold: pointer.From(input.SuccessThreshold), TerminationGracePeriod: pointer.From(input.TerminationGracePeriodSeconds), } From 9c3c7bcae3e57667beb215b4ffa25a8ab108195b Mon Sep 17 00:00:00 2001 From: Marin Binzari Date: Mon, 8 Jul 2024 23:09:58 +0300 Subject: [PATCH 3/5] fix field name --- internal/services/containerapps/helpers/container_apps.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/services/containerapps/helpers/container_apps.go b/internal/services/containerapps/helpers/container_apps.go index ef5393478dc8..87cfc64b0b25 100644 --- a/internal/services/containerapps/helpers/container_apps.go +++ b/internal/services/containerapps/helpers/container_apps.go @@ -1973,7 +1973,7 @@ func expandContainerAppReadinessProbe(input ContainerAppReadinessProbe) containe func flattenContainerAppReadinessProbe(input containerapps.ContainerAppProbe) []ContainerAppReadinessProbe { result := make([]ContainerAppReadinessProbe, 0) probe := ContainerAppReadinessProbe{ - InitialDelay: pointer.From(input.InitialDelay), + InitialDelay: pointer.From(input.InitialDelaySeconds), Interval: pointer.From(input.PeriodSeconds), Timeout: pointer.From(input.TimeoutSeconds), FailureThreshold: pointer.From(input.FailureThreshold), From c8002c021c2025e6f18dc03bbcfc12b75f419bf4 Mon Sep 17 00:00:00 2001 From: Marin Binzari Date: Thu, 24 Oct 2024 13:14:27 +0300 Subject: [PATCH 4/5] Remove SuccessThreshold from ContainerAppLivenessProbe and ContainerAppStartupProbe --- .../container_app_resource_test.go | 2 -- .../containerapps/helpers/container_apps.go | 34 ------------------- 2 files changed, 36 deletions(-) diff --git a/internal/services/containerapps/container_app_resource_test.go b/internal/services/containerapps/container_app_resource_test.go index 8473dc82bdd2..657c64553226 100644 --- a/internal/services/containerapps/container_app_resource_test.go +++ b/internal/services/containerapps/container_app_resource_test.go @@ -2223,7 +2223,6 @@ resource "azurerm_container_app" "test" { initial_delay = 5 timeout = 2 failure_count_threshold = 3 - success_count_threshold = 1 } startup_probe { @@ -2232,7 +2231,6 @@ resource "azurerm_container_app" "test" { initial_delay = 5 timeout = 5 failure_count_threshold = 1 - success_count_threshold = 1 } volume_mounts { diff --git a/internal/services/containerapps/helpers/container_apps.go b/internal/services/containerapps/helpers/container_apps.go index 87cfc64b0b25..2b1358132ff9 100644 --- a/internal/services/containerapps/helpers/container_apps.go +++ b/internal/services/containerapps/helpers/container_apps.go @@ -2021,7 +2021,6 @@ type ContainerAppLivenessProbe struct { Interval int64 `tfschema:"interval_seconds"` Timeout int64 `tfschema:"timeout"` FailureThreshold int64 `tfschema:"failure_count_threshold"` - SuccessThreshold int64 `tfschema:"success_count_threshold"` TerminationGracePeriod int64 `tfschema:"termination_grace_period_seconds"` } @@ -2116,14 +2115,6 @@ func ContainerAppLivenessProbeSchema() *pluginsdk.Schema { Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", }, - "success_count_threshold": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntBetween(1, 1), - Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to `1`. Must be `1` for liveness and startup Probes. Minimum value is `1`.", - }, - "termination_grace_period_seconds": { Type: pluginsdk.TypeInt, Computed: true, @@ -2208,12 +2199,6 @@ func ContainerAppLivenessProbeSchemaComputed() *pluginsdk.Schema { Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", }, - "success_count_threshold": { - Type: pluginsdk.TypeInt, - Computed: true, - Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to `1`. Must be `1` for liveness and startup Probes. Minimum value is `1`.", - }, - "termination_grace_period_seconds": { Type: pluginsdk.TypeInt, Computed: true, @@ -2232,7 +2217,6 @@ func expandContainerAppLivenessProbe(input ContainerAppLivenessProbe) containera PeriodSeconds: pointer.To(input.Interval), TimeoutSeconds: pointer.To(input.Timeout), FailureThreshold: pointer.To(input.FailureThreshold), - SuccessThreshold: pointer.To(input.SuccessThreshold), } switch p := strings.ToUpper(input.Transport); p { @@ -2273,7 +2257,6 @@ func flattenContainerAppLivenessProbe(input containerapps.ContainerAppProbe) []C Interval: pointer.From(input.PeriodSeconds), Timeout: pointer.From(input.TimeoutSeconds), FailureThreshold: pointer.From(input.FailureThreshold), - SuccessThreshold: pointer.From(input.SuccessThreshold), TerminationGracePeriod: pointer.From(input.TerminationGracePeriodSeconds), } if httpGet := input.HTTPGet; httpGet != nil { @@ -2317,7 +2300,6 @@ type ContainerAppStartupProbe struct { Interval int64 `tfschema:"interval_seconds"` Timeout int64 `tfschema:"timeout"` FailureThreshold int64 `tfschema:"failure_count_threshold"` - SuccessThreshold int64 `tfschema:"success_count_threshold"` TerminationGracePeriod int64 `tfschema:"termination_grace_period_seconds"` } @@ -2412,14 +2394,6 @@ func ContainerAppStartupProbeSchema() *pluginsdk.Schema { Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", }, - "success_count_threshold": { - Type: pluginsdk.TypeInt, - Optional: true, - Default: 1, - ValidateFunc: validation.IntBetween(1, 1), - Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to 1. Must be 1 for liveness and startup Probes. Minimum value is 1.", - }, - "termination_grace_period_seconds": { Type: pluginsdk.TypeInt, Computed: true, @@ -2500,12 +2474,6 @@ func ContainerAppStartupProbeSchemaComputed() *pluginsdk.Schema { Description: "The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`.", }, - "success_count_threshold": { - Type: pluginsdk.TypeInt, - Computed: true, - Description: "The minimum consecutive successes for the probe to be considered healthy after having failed. Defaults to 1. Must be 1 for liveness and startup Probes. Minimum value is 1.", - }, - "termination_grace_period_seconds": { Type: pluginsdk.TypeInt, Computed: true, @@ -2524,7 +2492,6 @@ func expandContainerAppStartupProbe(input ContainerAppStartupProbe) containerapp PeriodSeconds: pointer.To(input.Interval), TimeoutSeconds: pointer.To(input.Timeout), FailureThreshold: pointer.To(input.FailureThreshold), - SuccessThreshold: pointer.To(input.SuccessThreshold), } switch p := strings.ToUpper(input.Transport); p { @@ -2565,7 +2532,6 @@ func flattenContainerAppStartupProbe(input containerapps.ContainerAppProbe) []Co Interval: pointer.From(input.PeriodSeconds), Timeout: pointer.From(input.TimeoutSeconds), FailureThreshold: pointer.From(input.FailureThreshold), - SuccessThreshold: pointer.From(input.SuccessThreshold), TerminationGracePeriod: pointer.From(input.TerminationGracePeriodSeconds), } From 2114fd6aaff83183701c9b0a364bccac97eef0eb Mon Sep 17 00:00:00 2001 From: Marin Binzari Date: Thu, 24 Oct 2024 15:20:38 +0300 Subject: [PATCH 5/5] add documentation --- .../services/containerapps/helpers/container_apps.go | 12 ++++++------ website/docs/d/container_app.html.markdown | 10 +++++++--- website/docs/r/container_app.html.markdown | 10 +++++++--- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/internal/services/containerapps/helpers/container_apps.go b/internal/services/containerapps/helpers/container_apps.go index 2b1358132ff9..954e9d4f917d 100644 --- a/internal/services/containerapps/helpers/container_apps.go +++ b/internal/services/containerapps/helpers/container_apps.go @@ -1805,7 +1805,7 @@ func ContainerAppReadinessProbeSchema() *pluginsdk.Schema { Optional: true, Default: 0, ValidateFunc: validation.IntBetween(0, 60), - Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + Description: "The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", }, "interval_seconds": { @@ -1897,7 +1897,7 @@ func ContainerAppReadinessProbeSchemaComputed() *pluginsdk.Schema { "initial_delay": { Type: pluginsdk.TypeInt, Computed: true, - Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + Description: "The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", }, "interval_seconds": { @@ -2088,7 +2088,7 @@ func ContainerAppLivenessProbeSchema() *pluginsdk.Schema { Optional: true, Default: 1, ValidateFunc: validation.IntBetween(0, 60), - Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `1` seconds.", + Description: "The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `1` seconds.", }, "interval_seconds": { @@ -2178,7 +2178,7 @@ func ContainerAppLivenessProbeSchemaComputed() *pluginsdk.Schema { "initial_delay": { Type: pluginsdk.TypeInt, Computed: true, - Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `1` seconds.", + Description: "The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `1` seconds.", }, "interval_seconds": { @@ -2367,7 +2367,7 @@ func ContainerAppStartupProbeSchema() *pluginsdk.Schema { Optional: true, Default: 0, ValidateFunc: validation.IntBetween(0, 60), - Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + Description: "The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", }, "interval_seconds": { @@ -2453,7 +2453,7 @@ func ContainerAppStartupProbeSchemaComputed() *pluginsdk.Schema { "initial_delay": { Type: pluginsdk.TypeInt, Computed: true, - Description: "The number of seconds elapsed after the container has started before liveness or readiness probes are initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", + Description: "The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds.", }, "interval_seconds": { diff --git a/website/docs/d/container_app.html.markdown b/website/docs/d/container_app.html.markdown index a845098a8050..e1ae9f0227c9 100644 --- a/website/docs/d/container_app.html.markdown +++ b/website/docs/d/container_app.html.markdown @@ -151,7 +151,7 @@ A `liveness_probe` block supports the following: * `host` - The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes. -* `initial_delay` - The time in seconds to wait after the container has started before the probe is started. +* `initial_delay` - The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `1` seconds. * `interval_seconds` - How often, in seconds, the probe should run. Possible values are in the range `1` - `240`. Defaults to `10`. @@ -187,12 +187,14 @@ An `env` block supports the following: A `readiness_probe` block supports the following: -* `failure_count_threshold` - The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`. +* `failure_count_threshold` - The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`. * `header` - A `header` block as detailed below. * `host` - The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes. +* `initial_delay` - The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds. + * `interval_seconds` - How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10` * `path` - The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`. @@ -217,12 +219,14 @@ A `header` block supports the following: A `startup_probe` block supports the following: -* `failure_count_threshold` - The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`. +* `failure_count_threshold` - The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`. * `header` - A `header` block as detailed below. * `host` - The value for the host header which should be sent with this probe. If unspecified, the IP Address of the Pod is used as the host header. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes. +* `initial_delay` - The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds. + * `interval_seconds` - How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10` * `path` - The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`. diff --git a/website/docs/r/container_app.html.markdown b/website/docs/r/container_app.html.markdown index 885ecfb77e42..23a7ebc2ffcc 100644 --- a/website/docs/r/container_app.html.markdown +++ b/website/docs/r/container_app.html.markdown @@ -260,7 +260,7 @@ A `liveness_probe` block supports the following: * `host` - (Optional) The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes. -* `initial_delay` - (Optional) The time in seconds to wait after the container has started before the probe is started. +* `initial_delay` - (Optional) The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `1` seconds. * `interval_seconds` - (Optional) How often, in seconds, the probe should run. Possible values are in the range `1` - `240`. Defaults to `10`. @@ -298,12 +298,14 @@ An `env` block supports the following: A `readiness_probe` block supports the following: -* `failure_count_threshold` - (Optional) The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`. +* `failure_count_threshold` - (Optional) The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`. * `header` - (Optional) A `header` block as detailed below. * `host` - (Optional) The probe hostname. Defaults to the pod IP address. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes. +* `initial_delay` - (Optional) The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds. + * `interval_seconds` - (Optional) How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10` * `path` - (Optional) The URI to use for http type probes. Not valid for `TCP` type probes. Defaults to `/`. @@ -328,12 +330,14 @@ A `header` block supports the following: A `startup_probe` block supports the following: -* `failure_count_threshold` - (Optional) The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `10`. Defaults to `3`. +* `failure_count_threshold` - (Optional) The number of consecutive failures required to consider this probe as failed. Possible values are between `1` and `30`. Defaults to `3`. * `header` - (Optional) A `header` block as detailed below. * `host` - (Optional) The value for the host header which should be sent with this probe. If unspecified, the IP Address of the Pod is used as the host header. Setting a value for `Host` in `headers` can be used to override this for `HTTP` and `HTTPS` type probes. +* `initial_delay` - (Optional) The number of seconds elapsed after the container has started before the probe is initiated. Possible values are between `0` and `60`. Defaults to `0` seconds. + * `interval_seconds` - (Optional) How often, in seconds, the probe should run. Possible values are between `1` and `240`. Defaults to `10` * `path` - (Optional) The URI to use with the `host` for http type probes. Not valid for `TCP` type probes. Defaults to `/`.