Add script to set up Azure User-Assigned Managed Identity with flexib… #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Azure Login with Flexible Federated Credentials | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| get-subscription-info: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Log in to Azure | |
| uses: azure/login@v2 | |
| with: | |
| client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
| tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
| subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
| enable-AzPSSession: true | |
| - name: Get Azure Subscription Info | |
| shell: pwsh | |
| run: | | |
| $subscription = Get-AzSubscription | |
| Write-Output "Subscription Name: $($subscription.Name)" | |
| Write-Output "Subscription ID: $($subscription.Id)" | |
| Write-Output "Tenant ID: $($subscription.TenantId)" | |
| Write-Output "State: $($subscription.State)" |