-
Notifications
You must be signed in to change notification settings - Fork 51
Description
Description
I am encountering an intermittent 409 Conflict error when trying to create a server backup schedule directly after provisioning a STACKIT VM.
Importantly, this happens in a strictly sequential deployment flow. The code creates a single VM, waits for it to finish, and then immediately attempts to enable the backup service and schedule.
Hypothesis: It appears to be an eventual consistency issue within the STACKIT backend. The API reports the VM creation as "successful" and "ready" to the Terraform provider. However, when the provider immediately follows up with the request to enable the backup service for that project/VM, the backend is not yet fully prepared to accept it, resulting in a 409 Conflict.
Note: I am using Pulumi to provision my infrastructure, which relies on this Terraform provider under the hood. The error originates from the underlying provider/SDK logic.
Error Message:
error: core/core.go:118: provider: Error creating server backup schedule | Enabling server backup project before creation: enable server backup service: 409 Conflict, status code 409, Body: {"status":"CONFLICT","message":"Request failed","timestamp":"2026-03-09T10:52:02.155165875Z"}
Steps to reproduce
- Provision a single STACKIT VM via infrastructure-as-code.
- Ensure the code sequentially attempts to create a server backup schedule immediately after the VM resource reports as created.
- Run the deployment.
- Observe the sporadic 409 Conflict (sometimes it succeeds if the backend was fast enough, sometimes it fails).
Actual behavior
See above
Expected behavior
The provider should account for this eventual consistency delay. It should either verify that the VM/project is truly ready to accept backup configurations before proceeding, or implement a retry mechanism with an exponential backoff specifically for catching this 409 Conflict during service enablement.
Environment
- Infrastructure Tool: Pulumi
- Pulumi Provider Version: v0.0.4 (stackitcloud/pulumi-stackit)
- Underlying Terraform Provider Version: v0.85.0
Additional information
I know the server backup resource is in beta, but that makes it really frustrating to use.