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?

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 11, 2026

Hi Keith!

To troubleshoot this further, we'll need access to your workspace to determine what might be causing the issue via your build logs/YAML configuration. To do so, our system requires us to have a formal support ticket.

As you are a member of a Premium workspace, please raise a support directly with our team using the workspace URL (this can be copied from the browser):

If you encounter issues raising a ticket, please let me know your timezone so that I may raise one on your behalf with the team that operates during your working hours.

Cheers!

- Ben (Bitbucket Cloud Support)

 

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