Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to set KeyVault variables via Deployment Variables

Keith Grima
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 8, 2026

Hi,

I am unable to set Azure AppSettings using KeyVault variables, using BitBucket Deployment variables. 

Script:

    - step: &set_appsettings
        name: Set AppSettings & ConnectionStrings
        runs-on: ["windows"]
        script:
          - az webapp config appsettings set --resource-group $env:AZURE_RESOURCE_GROUP --name $env:AZURE__READ_APP_NAME --settings sqlConnection=$env:sqlConnection


The value in my BitBucket variable: 

@microsoft.KeyVault(SecretUri=https://kv.vault.azure.net/secrets/secretname)

If I replace the variable value to "abc" (as an example) everything works. But the moment I swap it to use the KeyVault value above the script fails.

Error: [VariableName] was unexpected at this time.

Has anyone faced this issue before?

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin Site Admin
TAGS
AUG Leaders

Atlassian Community Events