Open KnockOutEZ opened 1 week ago
Hey @KnockOutEZ thanks for the question! I believe that Terraform refreshes the state before each action. You can emulate the same behaviour with --refresh
in pulumi, like so pulumi up --refresh
. This should ensure that pulumi has the latest state for your resources before running the program.
Hey @VenelinMartinov thanks for the reply! Is there any way to enforce this programmatically into the provider so even if the customers dont run pulumi --refresh
it will still refresh the state by itself.
Hey, no, we currently have no way to specify that a provider should refresh by default. What is the use case you have for this? Why does the provider you are bridging require --refresh?
Hey, I'm using the pulumi-terraform-bridge provider in my Pulumi project, and I'm looking for a way to automatically run pulumi refresh after each step, similar to how Terraform automatically refreshes the state. In Terraform, when you apply changes, it automatically runs terraform refresh to ensure the state file accurately reflects the current infrastructure. This is a helpful behavior that ensures the state is always in sync. I'd like to see if there's a way to achieve the same behavior in the pulumi-terraform-bridge provider. Is there an option or configuration I can use to automatically run pulumi refresh after each pulumi up or pulumi destroy step? Alternatively, would it be possible to add this as a feature in a future release of the pulumi-terraform-bridge provider? Having the ability to automatically refresh the state would greatly improve the workflow and help prevent any state drift issues. Please let me know if you have any suggestions or insights on how I can achieve this. I'm happy to provide more context or work with the team to implement a solution.