mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-03 02:22:24 +00:00
fix(terraform): mark state partial on a rejected key update
#40512 added d.Partial(true) to resourceKeyUpdate, but it landed on the plannedKeyMetadata error path rather than the c.UpdateKey one. The test it shipped with drives a 400 from /key/update, which returns through the UpdateKey branch, so TestResourceKeyUpdateFailureKeepsPriorState has been failing on litellm_internal_staging since it merged Set the flag on the UpdateKey branch too. Without it the SDK hands back the diff-applied state, so a rejected update persists the planned values and the next plan reports no changes, silently dropping the update
This commit is contained in:
parent
600544837e
commit
2658eeaf6e
1 changed files with 1 additions and 0 deletions
|
|
@ -327,6 +327,7 @@ func resourceKeyUpdate(ctx context.Context, d *schema.ResourceData, m interface{
|
|||
key.Metadata = metadata
|
||||
|
||||
if _, err := c.UpdateKey(key); err != nil {
|
||||
d.Partial(true)
|
||||
return diag.FromErr(fmt.Errorf("error updating key: %s", err))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue