{"record":{"id":"a89000623bc761c2","repo":"hashicorp/terraform","slug":"invalid-retry-wait-min-s","errorCode":null,"errorMessage":"invalid retry_wait_min: %s","messagePattern":"invalid retry_wait_min: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backend/remote-state/http/backend.go","lineNumber":206,"sourceCode":"\t\tbackendbase.GetAttrEnvDefaultFallback(\n\t\t\tconfigVal, \"retry_max\",\n\t\t\t\"TF_HTTP_RETRY_MAX\", cty.NumberIntVal(2),\n\t\t),\n\t)\n\tif err != nil {\n\t\treturn backendbase.ErrorAsDiagnostics(\n\t\t\tfmt.Errorf(\"invalid retry_max: %s\", err),\n\t\t)\n\t}\n\tretryWaitMin, err := backendbase.IntValue(\n\t\tbackendbase.GetAttrEnvDefaultFallback(\n\t\t\tconfigVal, \"retry_wait_min\",\n\t\t\t\"TF_HTTP_RETRY_WAIT_MIN\", cty.NumberIntVal(1),\n\t\t),\n\t)\n\tif err != nil {\n\t\treturn backendbase.ErrorAsDiagnostics(\n\t\t\tfmt.Errorf(\"invalid retry_wait_min: %s\", err),\n\t\t)\n\t}\n\tretryWaitMax, err := backendbase.IntValue(\n\t\tbackendbase.GetAttrEnvDefaultFallback(\n\t\t\tconfigVal, \"retry_wait_max\",\n\t\t\t\"TF_HTTP_RETRY_WAIT_MAX\", cty.NumberIntVal(30),\n\t\t),\n\t)\n\tif err != nil {\n\t\treturn backendbase.ErrorAsDiagnostics(\n\t\t\tfmt.Errorf(\"invalid retry_wait_max: %s\", err),\n\t\t)\n\t}\n\n\trClient := retryablehttp.NewClient()\n\trClient.RetryMax = int(retryMax)\n\trClient.RetryWaitMin = time.Duration(retryWaitMin) * time.Second\n\trClient.RetryWaitMax = time.Duration(retryWaitMax) * time.Second","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/backend/remote-state/http/backend.go#L188-L224","documentation":"Same IntValue conversion path as retry_max but for retry_wait_min (default 1 second, env TF_HTTP_RETRY_WAIT_MIN). It bounds the minimum backoff delay between retryablehttp attempts. A fractional, missing, or out-of-range number produces this error wrapped with the IntValue failure.","triggerScenarios":"Setting retry_wait_min to a float like 0.5, a negative number, or a value HCL cannot coerce to int. Fires at Configure time.","commonSituations":"Operator assumes seconds can be fractional (0.5s); passes a duration string \"1s\" instead of a number; copies a value from a config that used milliseconds.","solutions":["Set retry_wait_min to a positive integer representing seconds (e.g. retry_wait_min = 1).","Drop the attribute to use the default of 1 second.","Confirm TF_HTTP_RETRY_WAIT_MIN holds a bare integer, not a Go duration string."],"exampleFix":"// before\nretry_wait_min = \"1s\"\n// after\nretry_wait_min = 1","handlingStrategy":"validation","validationCode":"func validateRetryWait(v interface{}, name string) error {\n  n, ok := v.(int)\n  if !ok { return fmt.Errorf(\"%s must be int seconds\", name) }\n  if n < 0 { return fmt.Errorf(\"%s must be >= 0\", name) }\n  return nil\n}","typeGuard":"func isRetryWait(v cty.Value) bool {\n  return v.Type() == cty.Number && !v.IsNull() && v.AsBigFloat().IsInt()\n}","tryCatchPattern":null,"preventionTips":["Treat retry_wait_* as integer seconds, never durations.","Keep retry_wait_min <= retry_wait_max in module defaults.","Lint env vars for decimal points before terraform init."],"tags":["config","type-coercion","http-backend","terraform"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T20:17:04.800Z"}