-
Notifications
You must be signed in to change notification settings - Fork 259
Closed
Labels
Description
Output from azd version
azd version 1.9.5 (commit cd2b7af)
Describe the bug
After running azd pipeline config --provider azdo (based on steps in: https://learn.microsoft.com/en-us/dotnet/aspire/deployment/azure/aca-deployment-github-actions?tabs=windows&pivots=azure-pipelines) and deploying pipeline to DevOps project I'm receiving error on provisioning step:
Provisioning Azure resources (azd provision)
Provisioning Azure resources can take some time.
Analyzing Aspire Application (this might take a moment...)
Downloading Bicep
(✓) Done: Downloading Bicep
Initialize bicep provider
Retrieving subscriptions...
panic: don't know how to prompt for type *survey.Password
goroutine 1 [running]:
github.com/azure/azure-dev/cli/azd/pkg/input.askOneNoPrompt({0x55f0e2abf660?, 0xc00021d4a0?}, {0x55f0e27ad880?, 0xc000479fd0?})
/mnt/vss/_work/1/s/cli/azd/pkg/input/asker.go:72 +0x3e5
github.com/azure/azure-dev/cli/azd/pkg/input.(*AskerConsole).Prompt.func1(0xc00022a1a0)
/mnt/vss/_work/1/s/cli/azd/pkg/input/console.go:607 +0x77
github.com/azure/azure-dev/cli/azd/pkg/input.(*AskerConsole).doInteraction(0xc00022a1a0, 0xc000641540)
/mnt/vss/_work/1/s/cli/azd/pkg/input/console.go:1125 +0x1b0
github.com/azure/azure-dev/cli/azd/pkg/input.(*AskerConsole).Prompt(0xc00022a1a0, {0x55f0e2ac3168, 0xc00021bef0}, {{0xc0004b5040, 0x43}, {0x0, 0x0}, {0x0, 0x0, 0x0}, ...})
/mnt/vss/_work/1/s/cli/azd/pkg/input/console.go:606 +0x395
github.com/azure/azure-dev/cli/azd/pkg/infra/provisioning/bicep.promptWithValidation[...]({0x55f0e2ac3168?, 0xc00021bef0}, {0x55f0e2ad34b0, 0xc00022a1a0}, {{0xc0004b5040, 0x43}, {0x0, 0x0}, {0x0, 0x0, ...}, ...}, ...)
/mnt/vss/_work/1/s/cli/azd/pkg/infra/provisioning/bicep/prompt.go:232 +0x119
github.com/azure/azure-dev/cli/azd/pkg/infra/provisioning/bicep.(*BicepProvider).promptForParameter(0xc0004a6fc0, {0x55f0e2ac3168, 0xc00021bef0}, {0xc000015c26, 0x9}, {{0xc000015c50, 0xc}, {0x0, 0x0}, 0x0, ...})
/mnt/vss/_work/1/s/cli/azd/pkg/infra/provisioning/bicep/prompt.go:185 +0x100d
github.com/azure/azure-dev/cli/azd/pkg/infra/provisioning/bicep.(*BicepProvider).ensureParameters(0xc0004a6fc0, {0x55f0e2ac3168, 0xc00021bef0}, {{0xc000047080, 0x5b}, {0xc000015ba7, 0x7}, 0xc0005837d0, 0xc000583890, 0x0})
/mnt/vss/_work/1/s/cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go:2067 +0xc1b
github.com/azure/azure-dev/cli/azd/pkg/infra/provisioning/bicep.(*BicepProvider).EnsureEnv(0xc0004a6fc0, {0x55f0e2ac3168, 0xc00021bef0})
/mnt/vss/_work/1/s/cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go:164 +0x33a
github.com/azure/azure-dev/cli/azd/pkg/infra/provisioning/bicep.(*BicepProvider).Initialize(0xc0004a6fc0, {0x55f0e2ac3168, 0xc00021bef0}, {0xc000228300?, 0x0?}, {{0x55f0e21e59e2, 0x5}, {0xc0002122d0, 0x18}, {0x55f0e21e4f02, ...}, ...})
/mnt/vss/_work/1/s/cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go:121 +0x199
github.com/azure/azure-dev/cli/azd/pkg/infra/provisioning.(*Manager).Initialize(0xc0002402d0, {0x55f0e2ac3168, 0xc00021bef0}, {0xc000228300, 0x31}, {{0x55f0e21e59e2, 0x5}, {0xc0002122d0, 0x18}, {0x55f0e21e4f02, ...}, ...})
/mnt/vss/_work/1/s/cli/azd/pkg/infra/provisioning/manager.go:69 +0x22d
github.com/azure/azure-dev/cli/azd/internal/cmd.(*ProvisionAction).Run(0xc00021d2c0, {0x55f0e2ac3168, 0xc00021bef0})
/mnt/vss/_work/1/s/cli/azd/internal/cmd/provision.go:190 +0x37f
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*MiddlewareRunner).RunAction.func1({0x55f0e2ac3168, 0xc00021bef0})
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/middleware.go:126 +0x429
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*HooksMiddleware).Run(0xc0000a5720, {0x55f0e2ac3168, 0xc00021bef0}, 0xc0003c8e80)
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/hooks.go:53 +0x262
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*MiddlewareRunner).RunAction.func1({0x55f0e2ac3168, 0xc00021bef0})
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/middleware.go:109 +0x2b8
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*TelemetryMiddleware).Run(0xc000224580, {0x55f0e2ac3168?, 0xc00021a9f0?}, 0xc0003c8e80)
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/telemetry.go:78 +0x918
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*MiddlewareRunner).RunAction.func1({0x55f0e2ac3168, 0xc00021a9f0})
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/middleware.go:109 +0x2b8
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*ExperimentationMiddleware).Run(0x55f0e21f3e2b?, {0x55f0e2ac3168, 0xc00021a9f0}, 0xc0003c8e80)
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/experimentation.go:64 +0x4d6
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*MiddlewareRunner).RunAction.func1({0x55f0e2ac3168, 0xc00021a9f0})
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/middleware.go:109 +0x2b8
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*UxMiddleware).Run(0xc000013b18, {0x55f0e2ac3168, 0xc00021a9f0}, 0xc0003c8e80)
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/ux.go:32 +0xa9
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*MiddlewareRunner).RunAction.func1({0x55f0e2ac3168, 0xc00021a9f0})
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/middleware.go:109 +0x2b8
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*DebugMiddleware).Run(0xc000013ae8, {0x55f0e2ac3168, 0xc00021a9f0}, 0xc0003c8e80)
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/debug.go:48 +0x35e
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*MiddlewareRunner).RunAction.func1({0x55f0e2ac3168, 0xc00021a9f0})
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/middleware.go:109 +0x2b8
github.com/azure/azure-dev/cli/azd/cmd/middleware.(*MiddlewareRunner).RunAction(0xc00044fc00, {0x55f0e2ac3168, 0xc00021a9f0}, 0xc000017aa0, {0xc0002123f0, 0x14})
/mnt/vss/_work/1/s/cli/azd/cmd/middleware/middleware.go:130 +0x155
github.com/azure/azure-dev/cli/azd/cmd.(*CobraBuilder).configureActionResolver.func1(0xc0004d0780, {0xc000224060?, 0x0, 0x1})
/mnt/vss/_work/1/s/cli/azd/cmd/cobra_builder.go:132 +0x3a7
github.com/spf13/cobra.(*Command).execute(0xc0004d0780, {0xc000224050, 0x1, 0x1})
/home/cloudtest/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:856 +0x694
github.com/spf13/cobra.(*Command).ExecuteC(0xc00048ec80)
/home/cloudtest/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x38d
github.com/spf13/cobra.(*Command).Execute(...)
/home/cloudtest/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
github.com/spf13/cobra.(*Command).ExecuteContext(...)
/home/cloudtest/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:895
main.main()
/mnt/vss/_work/1/s/cli/azd/main.go:65 +0x24b
##[error]Script failed with exit code: 2
/usr/bin/az account clear
To Reproduce
- Run
azd init --from-code --environment devon AppHost project - Run
azd pipeline config --provider azdoand provide secrets for dependencies. - Run pipeline
Expected behavior
Provisioning of all services as in given example.
Environment
Azure Devops Pipelines
Agent name: 'Hosted Agent'
Agent machine name: '...'
Current agent version: '3.241.0'
Operating System
Runner Image
Runner Image Provisioner
Current image version: '20240721.1.0'
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: Bash (3.241.1)
Downloading task: PowerShell (2.242.1)
Downloading task: AzureCLI (2.242.0)
VS 2022 v17.10.5
Additional context
Devops Pipeline:
trigger:
- main
- master
pool:
vmImage: ubuntu-latest
steps:
- task: Bash@3
displayName: Install azd
inputs:
targetType: 'inline'
script: |
curl -fsSL https://aka.ms/install-azd.sh | bash
# azd delegate auth to az to use service connection with AzureCLI@2
- pwsh: |
azd config set auth.useAzCliAuth "true"
displayName: Configure `azd` to Use AZ CLI Authentication.
- task: Bash@3
displayName: Install .NET Aspire workload
inputs:
targetType: 'inline'
script: |
dotnet workload install aspire
- task: AzureCLI@2
displayName: Provision Infrastructure
inputs:
azureSubscription: azconnection
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
cd src/IntegrationEngine.AppHost
azd provision --no-prompt
env:
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
AZURE_LOCATION: $(AZURE_LOCATION)
- task: AzureCLI@2
displayName: Deploy Application
inputs:
azureSubscription: azconnection
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
cd src/IntegrationEngine.AppHost
azd deploy --no-prompt
env:
AZURE_SUBSCRIPTION_ID: $(AZURE_SUBSCRIPTION_ID)
AZURE_ENV_NAME: $(AZURE_ENV_NAME)
AZURE_LOCATION: $(AZURE_LOCATION)
config.json from .env file (guids replaced by ...)
{
"infra": {
"parameters": {
"appConfig": "vault://.../...",
"keyVault": "vault://.../...",
"landingZoneStorageAccount": "vault://.../...",
"serviceBusApiSend": "vault://.../...",
"serviceBusRuntimeListen": "vault://.../..."
}
},
"vault": "..."
}
When providing values for secrets, I've tried both wrapping them in "" and without it without any change.