https://pulumi.com logo
#general
Title
# general
a

ambitious-crayon-56788

01/29/2020, 4:41 PM
Hi. I'm attempting to create an Azure
ZipBlob
resource, but without the blob that was previously created being deleted after every run of
pulumi up
. Each blob is uniquely named. I have discovered
CustomResourceOptions
, and from those options I've used
deleteBeforeReplace: false
, assuming this would stop to resource being deleted before it was replaced. However, this is not the case, and the blob previously created by the Pulumi resource is still deleted. How can I keep blobs previously created by the Pulumi resource?
Copy code
const zipBlob = new azure.storage.ZipBlob("storageBlob", {
	name: `MyApp.${version}.zip`,
    storageAccountName: storageAccount.name,
    storageContainerName: storageContainerForReleases.name,
    type: "block",
    content: new pulumi.asset.FileArchive("MyFileArchive"),
}, {
	deleteBeforeReplace: false
});
I have also tried to use the
CustomResourceOptions
of
protect
, but this caused the
pulumi up
operation to fail because Pulumi still tries to delete the resource, but can't because of the protection.