Terraform doesn't respect dependency during refresh

Yes I read this post before, the problem is not the plan phase, the resource B uses attributes of A explicitly, and the provider does not have any configuration (so no unknown attributes at config time). The problem comes during refresh, before planning: A is refreshed and marked as destroyed, but Terraform refreshes B anyway.

For now I solved the issue by having 2 separate Terraform modules.

1 Like