aspire icon indicating copy to clipboard operation
aspire copied to clipboard

[WebToolsE2E][Aspire] First run of "azd up" from AppHost fails with error: resolving bicep parameters file: substituting environment variables inside parameter file: missing closing brace

Open v-elenafeng opened this issue 1 year ago • 1 comments

INSTALL STEPS

  1. Clean machine: Win11 x64 23h2 ENU

  2. Install VS 17.11 Preview 1 latest released build

REPRO STEPS

  1. Create an Aspire Starter App, build solution

  2. Open the .AppHost project in File Explorer, run 'azd init' and 'azd up' using command line

ACTUAL Running "azd init" succeeds, but "azd up" fails ERROR: resolving bicep parameters file: substituting environment variables inside parameter file: missing closing brace image

Workaround 1: run 'azd init' and 'azd up' from solution folder Workaround 2: Create the second Aspire Starter App, run 'azd init' and 'azd up' from AppHost project folder

EXPECTED 'azd up' could be run successfully image

v-elenafeng avatar May 24 '24 09:05 v-elenafeng

cc @rajeshkamal5050 @vhvb1989 @ellismg

davidfowl avatar May 24 '24 14:05 davidfowl

Seems that the azd up command doesn't support environment variable names with a dot in it. In my case I ran azd init and the main.parameters.json ended up containing environment variables like so:

"rocketAppFrontendExists": {
  "value": "${SERVICE_ROCKETAPP.FRONTEND_RESOURCE_EXISTS=false}"
},

When I renamed the variable to this it worked:

"rocketAppFrontendExists": {
  "value": "${SERVICE_ROCKETAPP_FRONTEND_RESOURCE_EXISTS=false}"
},

Related finding here: https://github.com/Azure/azure-dev/issues/3183#issuecomment-1984304354

kamnyborg avatar Sep 23 '24 18:09 kamnyborg