Hello, is there a way to tell pulumi that you want...
# general
Hello, is there a way to tell pulumi that you want to delete something?
you can delete something by having your code not generate that resource anymore
yeah the thing is that it's not a resource I created
it's an automatically created resource, and I want to remove it
if it's not tracked in Pulumi state, then pulumi cannot delete it Let's say you had Pulumi create a k8s Service and creates a corresponding ALB. You can "have Pulumi delete" the ALB by changing your Service to not be associated with a Cloud LB, but it's not Pulumi that's deleting the resource - it's whatever integration that created the resource in the first place.
yeah exactly but not possible here
would be great though
that way I could get out of ansible for this use case
You can do it by importing the resource but not adding the generated code to your code base. That will put the resource in state; when you next run
, Pulumi will see the difference and remove the resource.
You can even do it in a reusable dummy project with a stack but no resources. It would work with any resource that can be imported.