{"record":{"id":"7158fdf1e431705f","repo":"hashicorp/terraform","slug":"invalid-retry-wait-max-s","errorCode":null,"errorMessage":"invalid retry_wait_max: %s","messagePattern":"invalid retry_wait_max: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backend/remote-state/http/backend.go","lineNumber":217,"sourceCode":"\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\n\trClient.Logger = log.New(logging.LogOutput(), \"\", log.Flags())\n\tif err = b.configureTLS(rClient, configVal); err != nil {\n\t\treturn backendbase.ErrorAsDiagnostics(err)\n\t}\n\n\tb.client = &httpClient{\n\t\tURL:          updateURL,\n\t\tUpdateMethod: updateMethod,\n\n\t\tLockURL:      lockURL,\n\t\tLockMethod:   lockMethod,","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/hashicorp/terraform/blob/c9def3e214014c1188faabfc4a5bde5095139765/internal/backend/remote-state/http/backend.go#L199-L235","documentation":"IntValue conversion failure for retry_wait_max (default 30 seconds, env TF_HTTP_RETRY_WAIT_MAX), the upper bound on retryablehttp backoff. Identical mechanism to errors 242/243: a non-integer, out-of-range, or uncoercible cty.Number triggers it. Note Configure does not validate retry_wait_max >= retry_wait_min.","triggerScenarios":"Setting retry_wait_max to a fractional or out-of-range value, or inverting it below retry_wait_min (which Configure permits but yields odd backoff behavior). Fires at Configure time.","commonSituations":"Operator enters 30.0 expecting int coercion; copies a float from monitoring dashboards; sets retry_wait_max lower than retry_wait_min by mistake.","solutions":["Set retry_wait_max to a positive integer >= retry_wait_min (e.g. retry_wait_max = 30).","Verify TF_HTTP_RETRY_WAIT_MAX is a bare integer string.","Remove the attribute to fall back to the default of 30 seconds."],"exampleFix":"// before\nretry_wait_max = 30.5\nretry_wait_min   = 40\n// after\nretry_wait_max = 30\nretry_wait_min = 1","handlingStrategy":"validation","validationCode":"func validateRetryWaits(minV, maxV interface{}) error {\n  if err := validateRetryWait(minV, \"retry_wait_min\"); err != nil { return err }\n  if err := validateRetryWait(maxV, \"retry_wait_max\"); err != nil { return err }\n  if minV.(int) > maxV.(int) {\n    return fmt.Errorf(\"retry_wait_min (%d) > retry_wait_max (%d)\", minV, maxV)\n  }\n  return nil\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set retry_wait_max >= retry_wait_min in shared configs.","Avoid floats; the schema is cty.Number-as-int.","Document backoff semantics in the backend block comments."],"tags":["config","type-coercion","http-backend","terraform"],"analyzedSha":"c9def3e214014c1188faabfc4a5bde5095139765","analyzedAt":"2026-08-07T15:39:49.278Z","schemaVersion":2},"datasetVersion":"2026-08-07T21:17:07.882Z"}