manifest for azfunc-light fails to deploy due to bad TABLEENDPOINT env
I experienced an error while deploying this where it didn't generate the correct env variable in my .azure/url-prod/.env file (url-prod) being the env name of my az up.
(x) Failed: Deploying service azfunc-light
ERROR: error executing step command 'deploy --all': failed deploying service 'azfunc-light': failed executing template file: template: manifest template:35:27: executing "manifest template" at <.Env.FUNCSTORAGEA17CA_TABLEENDPOINT>: map has no entry for key "FUNCSTORAGEA17CA_TABLEENDPOINT"
To fix this I ended up:
Copying
URL_DATA_TABLEENDPOINT="https://urldatam5do5xihwalvo.table.core.windows.net/"
to a new entry of
FUNCSTORAGEA17CA_TABLEENDPOINT="https://urldatam5do5xihwalvo.table.core.windows.net/"
My guess is the env generation script needs adjusted?
maybe it's the "-" in the name?
We should close this issues as we have no control over azd and there a workaround.
At that point I'd suggest then the hyphens get removed as the default names for these, it's not like I specified this name to break it, it's just the default so at the current time the default set up won't deploy correctly using the steps in README was my experience.
https://github.com/microsoft/AzUrlShortener/blob/82f4ee78251711ed23c8d4fcd59a01a16105f792/src/AppHost/Program.cs#L18
I wrote this line
output FUNCSTORAGEA17CA_TABLEENDPOINT string = funcstoragea17ca.outputs.tableEndpoint
in /src/infra/main.bicep
which allowed me to have a correct deployment.