{"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/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/backend/remote-state/http/backend.go#L188-L224","documentation":"backendbase.IntValue failed to convert the retry_wait_min value (attribute or TF_HTTP_RETRY_WAIT_MIN, default 1 second) to an int. Same constraints as retry_max: must be a whole number; fractional, NaN, Infinity, or out-of-range values are rejected.","triggerScenarios":"retry_wait_min set to a fractional number (0.5), NaN/Infinity, or a huge value exceeding int range.","commonSituations":"User wants sub-second waits and sets retry_wait_min = 0.5; a computed expression yields a float.","solutions":["Set retry_wait_min to a non-negative integer representing seconds (e.g. retry_wait_min = 1).","Remove the setting to use the default of 1 second.","Keep retry_wait_min <= retry_wait_max to avoid configuration surprises."],"exampleFix":"// before\nretry_wait_min = 0.5\n// after\nretry_wait_min = 1","handlingStrategy":"validation","validationCode":"# Pre-flight: retry_wait_min must be a non-negative integer (seconds)\nif [ -n \"$TF_HTTP_RETRY_WAIT_MIN\" ]; then\n  case \"$TF_HTTP_RETRY_WAIT_MIN\" in\n    ''|*[!0-9]*) echo \"ERROR: retry_wait_min must be a non-negative integer, got: $TF_HTTP_RETRY_WAIT_MIN\"; exit 1 ;;\n  esac\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set retry_wait_min to a whole number of seconds.","Keep retry_wait_min <= retry_wait_max.","Leave unset to accept the default of 1 second."],"tags":["config","validation","http-backend","retry"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}