Hi, is it possible to completely deploy powershell Azure functions with pulumi? I am looking for sim...
g
Hi, is it possible to completely deploy powershell Azure functions with pulumi? I am looking for similar experience to AWS Lambda.
m
Copy code
# I am using the Azure CLI to fetch the latest tag for the image.
def get_acr_image_latest_tag():
    command = ["az", "acr", "repository", "show-tags", "--name", acr_name, "--repository", repo_name, "--orderby", "time_desc", "--top", "1"]
    result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
    if result.returncode == 0:
        tags = json.loads(result.stdout)
        return tags[0]
    else:
        raise Exception(result.stderr)
This is how I handled one of my needs. Not awesome.
g
yes, this is what I was afraid of and something I am trying to avoid. PS you could use pulumi command instad of subprocess. Here I found something about
WEBSITE_RUN_FROM_PACKAGE
which should enable the usage of Blob storage. But MS docs are always so complex and hard to read… https://learn.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package#enable-functions-to-run-from-a-package
@microscopic-arm-69377 you may find this https://github.com/pulumi/examples/blob/master/azure-ts-functions/index.ts interesting
👍 1