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
Pipeline Config - Reuse previous service principal when available #2521
Conversation
Understand it shows in the logs, but if I ran that command days/weeks/months ago I will likely no longer have access to the generated principal name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It'd be good to add changelog notes about this new supported args :) |
eab5b6a
to
6fcb301
Compare
6fcb301
to
be9f910
Compare
be9f910
to
4999999
Compare
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
Related to #2468
Today every time a user runs
azd pipeline
config without any arguments a new service principal is created in Azure. This causes the following issues:What Changes
This PR introduces caching the service principal application client id in the
azd
environment. On subsequent run ofazd pipeline config
this same service principal will be reused instead of creating a new one.--principal-id
param to specify the client-id of an existing service principalAZURE_PIPELINE_CLIENT_ID
env var that can be set to lookup existing service principalAZURE_PIPELINE_CLIENT_ID
is now set in azd environment with new/updated service principal and used for lookups in subsequent callsWhat doesn't change
--principal-name
azd
will continue to create/update the specified service principal nameazd
environment and runningazd pipeline config
a new service principal will still be createdUse Case: Update pipeline config for new branch
When developing using multiple features branches users will need to run
azd pipeline config
for each branch in order to updated federated credentials (when using GitHub provider).Prior to this change, if a user ran
azd pipeline config
without a specified--principal-name
parameter they would need to manually discover the principal name to use in future calls.OR
Other Improvements
AD
related funcs out ofAzCli
interface and into newAdService
interface