Skip to content

Commit 12133d8

Browse files
Ensure Key Vault exists in deployment workflow
Updated the vmss-deploy GitHub Actions workflow to check for and create the 'dbatoolsci' Azure Key Vault if it does not exist, in addition to ensuring the resource group exists. This helps automate infrastructure setup for deployments.
1 parent 636b9eb commit 12133d8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/vmss-deploy.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
creds: ${{ secrets.VMSS_AZURE_CREDENTIALS }}
2828

29-
- name: Ensure resource group exists
29+
- name: Ensure resource group and Key Vault exist
3030
run: |
3131
if ! az group show --name dbatools-ci-runners &>/dev/null; then
3232
echo "Creating resource group dbatools-ci-runners..."
@@ -35,6 +35,13 @@ jobs:
3535
echo "Resource group dbatools-ci-runners already exists"
3636
fi
3737
38+
if ! az keyvault show --name dbatoolsci --resource-group dbatools-ci-runners &>/dev/null; then
39+
echo "Creating Key Vault dbatoolsci..."
40+
az keyvault create --name dbatoolsci --resource-group dbatools-ci-runners --location eastus
41+
else
42+
echo "Key Vault dbatoolsci already exists"
43+
fi
44+
3845
- name: Extract Azure credentials for Terraform
3946
id: azure-creds
4047
run: |

0 commit comments

Comments
 (0)