-
Notifications
You must be signed in to change notification settings - Fork 79
provider initialization and dependencies have race condition when used with eauch other #152
Comments
Workaround: Use the expected_version parameter to specify the PostgreSQL version you'll be deploying later. |
Specifying Also using Versions:
|
I'm having the same problem after changing to terraform 0.13, maybe it's related with the changes on providers with new terraform version. The host of the provider is depending on the output from my RDS module with the respective DB endpoint, but I'm receiving |
https://www.terraform.io/docs/configuration/providers.html#provider-configuration-1 says:
Does this mean this is impossible to do? Does the overall design of requiring |
I have been setting the host as the output from the RDS module with the trick of setting the expected_version to avoid problems during the init phase. This has been working fine for several months, but when I tried to upgrade to terraform 0.13 it is failing after the first apply. |
Is there any new regarding this topic? do you plan to look into this problem? I'm blocked to update to terraform 0.13 at the moment in all states using postgres provider, so it would be great to have some feedback. thanks a lot |
I found a workaround for this problem, maybe it could be useful for others. One of the main changes of terraform 0.13 is that the host of the provider cannot depend on an output from a module anymore but it can depend on the attributes exported by resources. So I just created a data terraform type to get the address from the DB in RDS. I just forced the data resource to depend on some output from the module that does the DB creation to be sure it is executed after. You have here an example for AWS RDS.
|
Hi there,
Context
The provider initialization and dependencies with any other resource have race condition between each other when used togerther, no way to use depends_on to workaround it
Terraform Version
Terraform v0.12.25
Provider version
Affected Resource(s)
Provider initialization
Debug Output
Expected Behavior
Wait for the provider initialization if the dependent resources isn't created yet.
Actual Behavior
The provider initialize before waiting for the dependencies to complete creating.
The text was updated successfully, but these errors were encountered: