Closed asw101 closed 2 years ago
I just ran this on the main branch. Could you provide some more information about your environment, draft version, etc.
➜ draftv2 (main) ✗ ./draft setup-gh -p azure -v
Enter app registration name: iztesting
[Draft] Checking that Azure Cli is installed...
[Draft] Checking that user is logged in to Azure CLI...
✔ 0e0d6284-a155-4d10-83da-9675ef354298
Enter resource group name: izroll-dev
Enter github organization and repo (organization/repoName): imiller31/go_echo
[Draft] Commencing github connection with azure...
[Draft] Checking that github cli is installed...
[Draft] --> Setting up Github OIDC... ⣾ [Draft] Github cli found!
[Draft] Checking that user is logged in to github...
[Draft] --> Setting up Github OIDC... ⡿ [Draft] User is logged in!
[Draft] Checking that provided information is valid...
[Draft] --> Setting up Github OIDC... ⣾ [Draft] Commencing Azure app creation...
[Draft] 2022-06-14 11:39:06.760873 -0400 EDT m=+29.686785587
[Draft] --> Setting up Github OIDC... ⣷ [Draft] App created successfully!
[Draft] 5.506264772s
[Draft] Creating Azure service principal...
[Draft] 2022-06-14 11:39:12.26724 -0400 EDT m=+35.193102374
[Draft] --> Setting up Github OIDC... ⡿ [Draft] Checking sp was created...
[Draft] --> Setting up Github OIDC... ⣷ [Draft] Service principal exists
[Draft] Service principal created successfully!
[Draft] 3.987388489s
[Draft] Fetching Azure account tenant ID
[Draft] --> Setting up Github OIDC... ⣽ [Draft] Fetching Azure application object ID
[Draft] --> Setting up Github OIDC... ⣯ [Draft] Assigning contributor role to service principal...
[Draft] --> Setting up Github OIDC... ⣾ [Draft] Role assigned successfully!
[Draft] Checking for existing federated credentials...
[Draft] --> Setting up Github OIDC... ⣽ [Draft] No existing credentials found
[Draft] Creating federated credentials...
[Draft] --> Setting up Github OIDC... ⣾ [Draft] Waiting 10 seconds to allow credentials time to populate
[Draft] --> Setting up Github OIDC... ⢿ [Draft] Checking for existing federated credentials...
[Draft] --> Setting up Github OIDC... ⣽ [Draft] Credentials found
[Draft] Setting AZURE_CLIENT_ID in github...
[Draft] --> Setting up Github OIDC... ⢿ [Draft] Setting AZURE_SUBSCRIPTION_ID in github...
[Draft] --> Setting up Github OIDC... ⣷ [Draft] Setting AZURE_TENANT_ID in github...
[Draft] --> Setting up Github OIDC... ⢿ [Draft] Github connection with azure completed successfully!
[Draft] Draft has successfully set up Github OIDC for your project 😃
[Draft] Use 'draft generate-workflow' to generate a Github workflow to build and deploy an application on AKS.
az version
➜ draftv2 (main) ✗ az version
{
"azure-cli": "2.37.0",
"azure-cli-core": "2.37.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"aks-preview": "0.5.60"
}
}
I just re-ran from main and encountered a different error.
[Draft] --> Setting up Github OIDC... ⢿ Fatal: [69 82 82 79 82 58 32 84 104 101 32 100 105 114 101 99 116 111 114 121 32 111 98 106 101 99 116 32 113 117 111 116 97 32 108 105 109 105 116 32 102 111 114 32 116 104 101 32 80 114 105 110 99 105 112 97 108 32 104 97 115 32 98 101 101 110 32 101 120 99 101 101 100 101 100 46 32 80 108 101 97 115 101 32 97 115 107 32 121 111 117 114 32 97 100 109 105 110 105 115 116 114 97 116 111 114 32 116 111 32 105 110 99 114 101 97 115 101 32 116 104 101 32 113 117 111 116 97 32 108 105 109 105 116 32 111 114 32 100 101 108 101 116 101 32 111 98 106 101 99 116 115 32 116 111 32 114 101 100 117 99 101 32 116 104 101 32 117 115 101 100 32 113 117 111 116 97 46 10]
Exiting.
This is because az ad app create
/ createAppCmd := exec.Command("az", "ad", "app", "create", "--only-show-errors", "--display-name", sc.AppName)
is failing in my directory, and it's using log.Fatal on a []byte.
I'll send a new PR to unblock this, avoid using log.Fatal, log.Printf the command output, and return errors instead.
For anyone hitting this, the underlying error is/was:
ERROR: The directory object quota limit for the Principal has been exceeded. Please ask your administrator to increase the quota limit or delete objects to reduce the used quota.
I'll then try to unblock the above and see if I can repro any further issues.
Thanks for catching this
I recently noticed the original error may have been related to: https://docs.microsoft.com/en-ca/cli/azure/microsoft-graph-migration
draft setup-gh
fails with the following error:az version
output:I will submit a PR for this in a moment.