forked from ncecere/terraform-provider-litellm
-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
In the litellm Terraform setup, changing certain immutable attributes (for example, a team name) causes Terraform to recreate dependent resources, which is expected behavior.
However, during this recreate flow, Terraform destroys the existing resources successfully, but then attempts to reference the same (now destroyed) resource IDs during the creation phase. Since these IDs no longer exist in Light LLM, the apply fails.
team_resource.teams["team-A"]: Destroying... [id=<redacted>]
team_resource.teams["team-B"]: Destroying... [id=<redacted>]
team_resource.teams["team-A-new"]: Creating...
team_resource.teams["team-B-new"]: Creating...
team_resource.teams["team-B"]: Destruction complete after 1s
team_resource.teams["team-A"]: Destruction complete after 1s
team_resource.teams["team-A-new"]: Creation complete after 2s [id=<new-id>]
team_resource.teams["team-B-new"]: Creation complete after 2s [id=<new-id>]
api_key.service_account["service-account-1"]: Modifying... [id=<redacted-key>]
api_key.service_tokens["service-token-1"]: Modifying... [id=<redacted-key>]
api_key.service_tokens["service-token-2"]: Modifying... [id=<redacted-key>]
api_key.service_tokens["service-token-3"]: Modifying... [id=<redacted-key>]
api_key.service_tokens["service-token-4"]: Modifying... [id=<redacted-key>]
╷
│ Error: error updating key: API request failed with status code 401
│ Response:
│ {
│ "error": {
│ "message": "Authentication Error: invalid user key - user key does not exist in database",
│ "type": "auth_error",
│ "code": "401"
│ }
│ }
│
│ with api_key.service_tokens["service-token-3"],
│ on service_tokens.tf line 70
╵
╷
│ Error: error updating key: API request failed with status code 401
│ Response:
│ {
│ "error": {
│ "message": "Authentication Error: invalid user key - user key does not exist in database",
│ "type": "auth_error",
│ "code": "401"
│ }
│ }
│
│ with api_key.service_account["service-account-1"],
│ on user_tokens.tf line 65
╵Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels