-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error create containerapp job with user managed identity #6349
Comments
Thank you for opening this issue, we will look into it. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @calvinsID. Issue DetailsDescribe the bugI am using the latest version of the containerapp extension 0.3.32 When I try to create a containerapp job (preview) with a managed identity I get errors. It seems the extension is splitting the resourceid of the managed identity in multiple strings. I give the following paratemer switch (I tried different variations, error is always there): Output with --debug: Related commandaz containerapp job create ErrorsResponse: '{"error":{"code":"BadRequest","message":"Resource identifier '/subscriptions/ff1a0889-5f9e-44bc-908c-59e3e993Response: '{"error":{"code":"BadRequest","message":"Resource identifier '/subscriptions/ff1a0889-5f9e-44bc-908c-59e3e99361c3/resourceGroups/rg-ghrunnersacajobs/providers/Microsoft.ManagedIdentity/userAssignedIdentities/[' is invalid."}}'.'. Issue script & Debug outputExpected behaviorA working container job with a user managed identity Environment Summaryazure-cli 2.49.0 core 2.49.0 Extensions: Dependencies: Python location '/opt/az/bin/python3' Python (Linux) 3.10.10 (main, May 19 2023, 08:20:31) [GCC 11.3.0] Additional contextIssue reported also here: Azure/azure-cli#26560
|
@Greedygre could you please look at the issue? |
@anandanthony Hi, could you please look at this issue about containerapp job create ? |
Seems to be working now, with version 0.3.33 :) |
@Greedygre @anandanthony I think the documentation should be updated with the new --mi-user-assigned parameter |
@olandese This seems to be fixed now. |
Describe the bug
I am using the latest version of the containerapp extension 0.3.32
When I try to create a containerapp job (preview) with a managed identity I get errors. It seems the extension is splitting the resourceid of the managed identity in multiple strings.
I give the following paratemer switch (I tried different variations, error is always there):
--user-assigned '/subscriptions/XXXXXX/resourceGroups/rg-test/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-mi-user'
Output with --debug:
Related command
az containerapp job create
--name "ghrunnersacajobstest"
--resource-group "rg-ghrunnersacajobs"
--environment "ghrunnersacajobs"
--trigger-type "Event"
--replica-timeout 604800
--replica-retry-limit 1
--image "aztfmod/rover-agent:1.2.9-2305.1807-github"
--cpu "2" --memory "4Gi"
--min-executions "0"
--parallelism 10
--max-executions "10"
--scale-rule-name "github-runner"
--scale-rule-type "github-runner"
--scale-rule-metadata "owner=devops-circle" "runnerScope=repo" "repos=gh-runners-aca-jobs"
--scale-rule-auth "personalAccessToken=pat-token-secret"
--secrets "pat-token-secret=THISISASECRET"
--env-vars "EPHEMERAL=true" "URL=https://github.com" "GH_TOKEN=secretref:pat-token-secret" "GH_OWNER=devops-circle" "GH_REPOSITORY=gh-runners-aca-jobs" "LABELS=test"
--user-assigned "/subscriptions/XXXXXXXXX/resourcegroups/rg-ghrunnersacajobs/providers/Microsoft.ManagedIdentity/userAssignedIdentities/mi-ghrunnersacajobs"
Errors
Response: '{"error":{"code":"BadRequest","message":"Resource identifier '/subscriptions/ff1a0889-5f9e-44bc-908c-59e3e993Response: '{"error":{"code":"BadRequest","message":"Resource identifier '/subscriptions/ff1a0889-5f9e-44bc-908c-59e3e99361c3/resourceGroups/rg-ghrunnersacajobs/providers/Microsoft.ManagedIdentity/userAssignedIdentities/[' is invalid."}}'.'.
az_command_data_logger: (FailedIdentityOperation) Identity operation for resource '/subscriptions/ff1a0889-5f9e-44bc-908c-59e3e99361c3/resourceGroups/rg-ghrunnersacajobs/providers/Microsoft.App/jobs/ghrunnersacajobstest' failed with error 'Failed to perform resource identity operation. Status: 'BadRequest'. Response: '{"error":{"code":"BadRequest","message":"Resource identifier '/subscriptions/ff1a0889-5f9e-44bc-908c-59e3e99361c3/resourceGroups/rg-ghrunnersacajobs/providers/Microsoft.ManagedIdentity/userAssignedIdentities/[' is invalid."}}'.'.
Issue script & Debug output
Expected behavior
A working container job with a user managed identity
Environment Summary
azure-cli 2.49.0
core 2.49.0
telemetry 1.0.8
Extensions:
containerapp 0.3.32
Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0
Python location '/opt/az/bin/python3'
Extensions directory '/home/olandese/.azure/cliextensions'
Python (Linux) 3.10.10 (main, May 19 2023, 08:20:31) [GCC 11.3.0]
Additional context
Issue reported also here: Azure/azure-cli#26560
The text was updated successfully, but these errors were encountered: