function.json
{
"scriptFile": "__init__.py",
"disabled": false,
"bindings": [
{
"name": "blob",
"type": "blobTrigger",
"direction": "in",
"path": "{CONTAINERNAME}",
"connectionStringSetting": "BLOB_CONNECTION_STRING"
}
]
}
app/init.py
CONTAINERNAME =os.environ.get("CONTAINERNAME")
def main(blob: func.InputStream):
logging.info(f"Python blob trigger function processed blob \n"
f"Name:{blob.name}\n"
f"Blob Size: {blob.length} bytes")
I am required to pass the dynamic container name to function.json as it may change/update in the future so somehow I can pass it through the environment variable. I have tried different ways like
- %CONTAINERNAME%
- ${CONTAINERNAME}
- {CONTAINERNAME}
- "pathStringSetting": "{CONTAINERNAME}",
But I'm getting the same error: The 'app' function is in error: Unable to configure binding 'blob' of type 'blobTrigger'. This may indicate invalid function.json properties. Can't figure out which ctor to call.

