`pulumi destroy stack` ? it's not same as `pulumi ...
# google-cloud
pulumi destroy stack
? it's not same as
pulumi stack rm
You can either comment out the line of code for the resource and run
pulumi up
or you can use
Copy code
pulumi destroy --target stringArray

Specify a single resource URN to destroy. All resources necessary to destroy this target will also be destroyed. Multiple resources can be specified using: --target urn1 --target urn2
are you intending to delete the resource temporarily so that it will get rebuilt the next time you do
pulumi up
or are you trying to remove a resource from your stack entirely? If the former (temporary remove) then
pulumi destroy --target <urn>
is what you need. If the latter, remove the resource from your code and Pulumi will automatically destroy it the next time you do a
pulumi up
Ok, imagine, I need to create a gke cluster for the use of a demo (Scrum style). So, I start it the Thursday morning and end it the friday evening. Another cluster can be start the morning and end it the evening every day. I use ansible for now and I can use the state to make it present or absent.
But It would be really nice to make a ressource present or absent as I want. Without command line but in code.
But maybe I have a solution, I will try out.
Ok, I simply use golang array to dynamize cluster list. And pulumi up manage the rest for me ! Thanks all for your help
Unlike terraform, I can put a dynamic name for the ressource !