-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulumi fails to recreate Hashicorp Vault resources after provider change #176
Comments
Wonder if this is a similar issue to pulumi/pulumi-aws#2009 where the vault provider told the engine it had created a new resource, but actually it was the same ID as the existing resource, so when the engine then went to delete the old resource nothing was left. |
Were sorry for the confusion. If you don't want to create a replace when switching resources, you can use aliases. Otherwise you can set deleteBeforeReplace. @pulumi/platform-providers Is there anything we are missing? |
@iwahbe i believe this is also related to the work @Frassle and I were talking about with pulumi/pulumi-aws#2009 It might be worth him looking at this to see if that's the case |
Is this basically the same issue as pulumi/pulumi#6078 – essentially a rename, but at the provider level? |
Partially. But in the case where you really do want to do a provider replace here it should be able to handle recreating vault policies. |
Yup this is exactly the same as pulumi/pulumi-aws#2009. policy creating is idempotent so if you set an explicit name (and the go code attached to this ticket does that) then the provider will return OK for the create even though it hasn't actually created a new resource, its just the same as the old resource. pulumi/pulumi#9903 and pulumi/pulumi#9909 will fix this. |
What happened?
We recently moved all our pulumi resources that configure Hasicorp Vault from the default provider to an explicit provider. As part of the move, pulumi recreated some resource. However, pulumi didn't recreate the resources in Vault even though its state shows that it has recreated it. This caused some of our resources to be silently deleted without any warning.
Steps to reproduce
The change can be reproduced using a dev vault server:
Pulumi Go code
pulumi up
and create the resources$ vault policy list default test root
Pulumi Go code
Pulumi Up Output
$vault policy list default root
Expected Behavior
The expected behavior is that the resource will not only get deleted but also recreated. (In the ideal case, pulumi determines that the explicit and default provider point to the same vault and simply update the state without recreating the resource)
Actual Behavior
The resource marked to be replaced gets deleted but not recreated despite the pulumi state recording that it has be created
Versions used
v3.34.1
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: