Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,23 @@ jobs:
tenant-id: ${{ steps.azure-creds.outputs.tenant-id }}
subscription-id: ${{ steps.azure-creds.outputs.subscription-id }}

- name: Bootstrap Dev Key Vault Access
if: matrix.environment == 'dev'
run: |
set -euo pipefail
DEPLOYER_OBJECT_ID=$(az ad sp show \
--id "${{ steps.azure-creds.outputs.client-id }}" \
--query id \
-o tsv)
if [ -z "$DEPLOYER_OBJECT_ID" ]; then
echo "Error: failed to resolve Azure service principal object ID" >&2
exit 1
fi
az keyvault set-policy \
--name nl-dev-convolens-kv \
--object-id "$DEPLOYER_OBJECT_ID" \
--secret-permissions get list set delete purge recover
Comment on lines +227 to +230

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Skip the bootstrap until the Key Vault exists

On the first dev deployment (and after the documented terraform destroy), nl-dev-convolens-kv does not yet exist; the dev Terraform configuration is what creates it. This unconditional az keyvault set-policy therefore exits nonzero before Terraform Init/Apply can create the vault, preventing CI from provisioning or recreating the environment. Guard the command for a missing vault, or perform this bootstrap only after the vault is known to exist.

Useful? React with 👍 / 👎.


- name: Terraform Init
env:
ARM_CLIENT_ID: ${{ steps.azure-creds.outputs.client-id }}
Expand Down
Loading