I was running a `pulumi destroy` ... it listed a r...
# general
b
I was running a
pulumi destroy
... it listed a resource that was not created by my pulumi stack to be deleted. This resource was a prior existing resource that was added into the stack via an aws resource id. Will pulumi destroy this resource? If so, how do you tell pulumi to never destroy a resource not created by it? I got this resource via a
get
call.
Copy code
const not_my_tbl = aws.dynamodb.Table.get('not_my_table', 'not_my_table')
*In general, is there a way to mark a resource to never be destroyed?
w
We recently changed this to use a different word to avoid the confusion - Pulumi will not actually delete the resource from the cloud provider if it was read in with
.get
. Re: marking as not delete, there is an option in the ResourceOptions for any resource that can say
protected: true
which will prevent any attempt to delete the resource until that property is first removed in a separate update.
b
Hello, Just started using Pulumi. I am reading in a set of global/shared resources using .get(). When i execute a destroy command it still labels them as to be deleted. also the resource option { protected: true } does not appear correct. It seems like its supposed to be { protect: true }. None of those prevent it from being listed for deletion on a destroy command though.
Code that results in resources still being flagged for delete, or argument errors
Flagged for delete, even though .get or {protect:true} was used.