My test pipeline is failing instantly with error “The secrets provider can not be found” when attempting to use the newly release Azure Keyvault Secret provider
Following this documentation Use Azure Key Vault secrets in GitLab CI/CD | GitLab
Using the SaaS Premium licenced gitlab and public runners (they advertise as 16.3-beta)
Pipeline codes looks like
stages:
- prepare
job:
stage: prepare
image: mcr.microsoft.com/azure-cli:latest
secrets:
testpassword:
azure_key_vault:
name: 'test-secret'
version: '<secret version>'
script:
- az login --service-principal -u $ARM_CLIENT_ID -t $ARM_TENANT_ID --federated-token $CI_JOB_JWT_V2
- az account show
- echo $testpassword
I’ve tried with and without the id_tokens keyword, my read from the gitlab feature issue is this should be optional and fallback on the CI_JOB_JWT_V2 if not present.
The azure federation works. If I remove secrets keyword the az login/account show work perfectly.