How can I tell Pulumi to overwrite all resources t...
# kubernetes
l
How can I tell Pulumi to overwrite all resources that are already there?
--replace
requires that you specify each resource, but there are quite a lot, I just want it to clobber everything.
b
destroy and replace?
l
I suspect Joseph might be looking for refresh: https://www.pulumi.com/docs/reference/cli/pulumi_refresh/
l
No, a refresh won't fix this issue, nor will destroy. I just want Pulumi to overwrite any resources in the way.
👍 1
For example, this is the error I'm seeing when trying to deploy, even with
-r
(refresh):
Copy code
01-Apr-2021 10:05:42	Retry #0; creation failed: <http://clusterroles.rbac.authorization.k8s.io|clusterroles.rbac.authorization.k8s.io> "flannel" already exists
01-Apr-2021 10:05:42	error: resource flannel was not successfully created by the Kubernetes API server : <http://clusterroles.rbac.authorization.k8s.io|clusterroles.rbac.authorization.k8s.io> "flannel" already exists
l
I'm guessing the thinking is that when destroying unmanaged resources you would want to do this carefully and know exactly what Pulumi will destroy. However I can see your point if this is just a dev environment. Looking through the code I don't see any simple way to do this. Perhaps you could instead automate the step of removing these resources with whatever you used to create them?