What happens during the subsequent applies with a btp resource that was created during the initial apply? #1017
-
I've recently started seeing deadlocks with btp entitlements. Morever, reapplying will not help as the btp subaccount is in a failed state. It cannot be accessed at all from btp cocpit. I was just wondering whether telling tf explicitly - just create a resource - and then do nothing (no updates, only reads) until it is supposed to be destroyed - would help a bit to alleviate the deadlock issue On the other hand I have been experiencing the aforementioned deadlocks with the initial apply - so the subaccount was empty and these entitlements did not yet exist. Using latest BTP TF provider version 1.9 and TF version 1.9.8
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
First things first, I do not think that the Concerning the issue you are facing: we introduced a retry logic for assigning/creating entitlements as there are some locking issues when entitlements are provisioned in parallel (sometimes). While this should help concerning the rate limiting, if the API on the platform runs and puts the subaccount in an inconsistent state (not TF state), I do not see an option from the provider perspective to "heal" that situation on SAP BTP. You could reduce the degree Terraform executes applications in parallel via the |
Beta Was this translation helpful? Give feedback.
The resource
subscription
does not support updates in general (see https://github.com/SAP/terraform-provider-btp/blob/main/internal/provider/resource_subaccount_subscription.go#L272)When the situation you describe appears, the Terraform execution plan wants to trigger an update on the resource. When this is triggered depends on the changes in your overall configuration and how Terraform interprets that change and propagates it down the chain of dependencies.
Thinking about it, maybe it makes sense to add RequiresReplace modifiers to the parameters, when one of the subscription parameters gets changed