protect
Marks a resource as protected. A protected resource cannot be deleted directly, and it will be an error to do a Pulumi deployment which tries to delete a protected resource for any reason.
To delete a protected resource, it must first be unprotected. There are two ways to unprotect a resource:
Set
protect(false)
and then runpulumi up
Use the
pulumi state unprotect
command
Once the resource is unprotected, it can be deleted as part of a following update.
The default is to inherit this value from the parent resource, and false for resources without a parent.