Create Azure AD federated identity credentials
References
https://docs.gitlab.com/ee/ci/cloud_services/azure/#create-azure-ad-federated-identity-credentials
Related issue(s):
How to increase the scope about subject ? Because at the moment a branch is mandatory. If we want to do this for all branches, we must create many secrets. It could be hard to maintain so many secrets. In the case of CI/CD with dynamic environment, it is a step to automatize. It could be nice to have wildcard or more documentation about this subject. Thanks a lot
Further Details
objectId=$(az ad app show --id $appId --query id -otsv)
cat <<EOF > body.json
{
"name": "gitlab-federated-identity",
"issuer": "https://gitlab.example.com",
"subject": "project_path:<mygroup>/<myproject>:ref_type:branch:ref:<branch>",
"description": "GitLab service account federated identity",
"audiences": [
"https://gitlab.example.com"
]
}
EOF