I have an issue with terraform apply -replace as it tries to create object before destroy is finished and as a result it fails. Looks like TF treats destroy and create as completely independent as same operation is working fine with sequential execution (parallelism=1)
Is it expected behavior?
Terraform always completes one action entirely before the next is started, so if the resource is supposed to be destroyed then created, the two versions cannot exist at the same time within Terraform. If the provider is reporting that the resource is destroyed when in fact it is not, then that would need to be remedied by the provider.
The -parallelism flag should not affect this, since these are serial operations, but it’s possible that the delay imposed by making all other operations serial is just enough for the remote service to catch up.