This message was deleted.
# azure
s
This message was deleted.
t
Why not use a Blob resource to upload the file and keep it around even after the deployment?
m
Hi @tall-librarian-49374, I will be uploading to Blob storage but don't like to keep documents that are no longer required hanging around. Is there anything I can use to make sure the file is uploaded before the CustomScriptExtension deployment runs and that it has completed before I delete the file?
t
Is there anything I can use to make sure the file is uploaded before the CustomScriptExtension deployment runs
You can add a
dependsOn
from the extension resource to the blob resource I guess
m
OK so I'm assuming that would require me to use pulumi code to upload the blob rather than calling the SDK directly, is that correct? In a similar manner is there any way to run SDK code after the CustomScriptExtension deployment finishes (i.e. so I can delete the blob)? e.g. is there a way to run arbitrary code that "DependsOn" a deployemnt? Alternatively is there a way to have arbitrary clean-up code run after all deployments have finished (effectively a finally block)?
t
m
It does indeed. I will try sticking the delete code inside an apply to see if that will do what I need