Hey. I'm attempting to control the name of the blo...
# azure
a
Hey. I'm attempting to control the name of the blob that is used with
azure.appservice.ArchiveFunctionApp
, but when I add the
zipBlob
property and remove the
archive
property, I'm met with an error -
Error: Deployment [archive] must be provided.
The docs describe
zipBlob
as "The blob containing all the code for this FunctionApp". If I leave the
archive
property in place, two blobs are uploaded to Storage - one is my
zipBlob
and the other is the randomly named blob created by the
ArchiveFunctionApp
. I'm guessing that there is a way to do this, but the docs seem pretty light on details (in fact they don't seem to mention
archive
at all), so I'm not too sure where to go from here? • Documentation: https://www.pulumi.com/docs/reference/pkg/nodejs/pulumi/azure/appservice/#ArchiveFunctionApp
Copy code
const functionApp = new azure.appservice.ArchiveFunctionApp("archiveFunctionApp", {
	name: "my-function-app",
	resourceGroupName: resourceGroup.name,
	archive: new pulumi.asset.FileArchive("./MyArchive"),
	plan: appServicePlan,
	account: storageAccount,
	container: storageContainer,
	zipBlob: zipBlob,
	version: "~2",
	appSettings: {
		FUNCTIONS_WORKER_RUNTIME: "powershell"
	}
});
t
What is
zipBlob
? Can you show the snippet?
Basically, you should use
archive
for whatever blob you want to use.
a
@tall-librarian-49374 - snippet is there now, accidentally posted early without it.
t
Thanks! Note that
zipBlob
is the property of
ArchiveFunctionApp
itself - it’s an output from the resource.
a
Ah, OK, so I'll remove that. How should I provide a blob that I created via the
azure.storage.ZipBlob
resource?
t
What is the reason you need to do it manually?
a
I'd like to keep a copy of all the different versions of my Function App. This seemed like a sensible way of doing it.
t
I guess you’d have to create a copy zip for that then. Like, have an archive blob folder with all historic files + the current zip blob file auto-created by Pulumi.
If that’s not satisfactory, feel free to create an issue in github
a
Yeah, that's what I working towards. Not perfect, but for the sake of one extra blob it's acceptable for my use case.