{"record":{"id":"12553fd9bb82a9d8","repo":"hashicorp/terraform","slug":"apply-discarded","errorCode":null,"errorMessage":"Apply discarded.","messagePattern":"Apply discarded\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/backend/remote/backend_common.go","lineNumber":26,"sourceCode":"\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"math\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\ttfe \"github.com/hashicorp/go-tfe\"\n\n\t\"github.com/hashicorp/terraform/internal/backend/backendrun\"\n\t\"github.com/hashicorp/terraform/internal/logging\"\n\t\"github.com/hashicorp/terraform/internal/plans\"\n\t\"github.com/hashicorp/terraform/internal/terraform\"\n)\n\nvar (\n\terrApplyDiscarded   = errors.New(\"Apply discarded.\")\n\terrDestroyDiscarded = errors.New(\"Destroy discarded.\")\n\terrRunApproved      = errors.New(\"approved using the UI or API\")\n\terrRunDiscarded     = errors.New(\"discarded using the UI or API\")\n\terrRunOverridden    = errors.New(\"overridden using the UI or API\")\n)\n\nvar (\n\tbackoffMin = 1000.0\n\tbackoffMax = 3000.0\n\n\trunPollInterval = 3 * time.Second\n)\n\n// backoff will perform exponential backoff based on the iteration and\n// limited by the provided min and max (in milliseconds) durations.\nfunc backoff(min, max float64, iter int) time.Duration {\n\tbackoff := math.Pow(2, float64(iter)/5) * min\n\tif backoff > max {","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/hashicorp/terraform/blob/d32a084675427f5ac3f7d2868578ef8b2c1dc525/internal/backend/remote/backend_common.go#L8-L44","documentation":"An Attribute has a non-empty DeprecationMessage while Deprecated is false. As with nested blocks, DeprecationMessage is only valid alongside Deprecated=true, so the schema is inconsistent. The attribute-level check mirrors the block-level one.","triggerScenarios":"An Attribute with DeprecationMessage: \"use new_attr\" but Deprecated left false. Guard at internal_validate.go:155 is `!a.Deprecated && a.DeprecationMessage != \"\"`.","commonSituations":"Authoring a deprecation message and forgetting the Deprecated flag; clearing Deprecated during un-deprecation but leaving the message string behind.","solutions":["Set Deprecated: true so the DeprecationMessage is honored.","Remove the DeprecationMessage if the attribute is not actually deprecated."],"exampleFix":"// before\n\"old_attr\": { Type: cty.String, Optional: true, DeprecationMessage: \"use new_attr\" },\n// after\n\"old_attr\": { Type: cty.String, Optional: true, Deprecated: true, DeprecationMessage: \"use new_attr\" },","handlingStrategy":"validation","validationCode":"// Attribute deprecation fields must agree.\nfunc attrDeprecationConsistent(a *configschema.Attribute) bool {\n    return a == nil || a.Deprecated || a.DeprecationMessage == \"\"\n}","typeGuard":"func deprecationConsistent(deprecated bool, msg string) bool { return msg == \"\" || deprecated }","tryCatchPattern":null,"preventionTips":["Set Deprecated: true whenever you write a DeprecationMessage.","When un-deprecating an attribute, clear both fields.","Cover deprecation handling in schema unit tests."],"tags":["schema-validation","configschema","attribute","deprecation","provider-schema"],"backgroundTag":null,"analyzedSha":"d32a084675427f5ac3f7d2868578ef8b2c1dc525","analyzedAt":"2026-08-11T18:43:52.779Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}