-
Notifications
You must be signed in to change notification settings - Fork 177
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
Ask fewer questions during init
.
#1752
Conversation
Well, I get it for |
efa84b1
to
aec48de
Compare
f8ac231
to
2fc572c
Compare
Long term this make sense to be provider specific state, it does lead to some slight duplication today, but I think it is better in the long run.
2fc572c
to
3e11df8
Compare
I continue to think about this - but it's something we'll have to relax in the future. I think the code is structured in a way such that it would be fairly straightforward to allow. |
init
.init
.
A common scenario is sharing envs. So a developer shouldn't be required to run provision in order to deploy. Steps (No provision on that machine) |
This continues to work. |
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.
Overall looks good to me. I love the changes, and also the small code hygiene improvements made along the way. None of those small changes detracted from the overall review.
I'll reflect upon my own honoring of "boy scout rules" -- I've been hesitant with avoiding introducing any additional changes as part of a feature change, but I can see now that it's really possible to make small subtle changes that are overall readable (and with test coverage).
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.
Overall looks good to me. I love the changes, and also the small code hygiene improvements made along the way. None of those small changes detracted from the overall review.
I'll reflect upon my own honoring of "boy scout rules" -- I've been hesitant with avoiding introducing any additional changes as part of a feature change, but I can see now that it's really possible to make small subtle changes that are overall readable (and with test coverage).
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash:
pwsh:
WindowsPowerShell install
MSI install
Standalone Binary
MSIContainer
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference (preview)
|
This change reworks environment initialization to no longer require a subscription or location. Instead, these properties are now state that are managed by the individual providers and stored in the environment (long term, we envision other provisioning providers which don't need a subscription id or location, which is why each provider manages this state instead of the
provisoning.Manager
type).Since
init
andnew
no longer configure either the subscription or location, they no longer require you to be logged into Azure.In addition,
AZURE_PRINCIPAL_ID
is no longer added to the.env
file. Instead, the value is present when evaluating the parameters template file (this means that if you log in as a different principal from the one you created the environment with, when you runazd provision
, you'll get the id of the current principal, not the old principal, which makes more sense) but not persisted to disk.Components which need to call either
GetSubscriptionId
orGetLocation
must now guard against the case where these values are not set, becauseprovision
(orenv refresh
) have not been run yet. In these cases, we tell the user the command can not run because infrastructure has not been provisioned and guide them to runazd provision
.