Skip to content
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

Update enable-subscription-id-overriding.md with limitations #15796

Merged
merged 3 commits into from
Sep 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# How to: Enable Overriding Subscription ID in Your Module

- [Background](#background)
- [Limitation](#limitation)
- [Steps](#steps)
- [Add `SupportsSubscriptionId` Attribute](#add-supportssubscriptionid-attribute)
- [Regenerate Help Documents](#regenerate-help-documents)
Expand All @@ -23,6 +24,14 @@ New-AzAksCluster ... -SubscriptionId "00000000-0000-0000-0000-000000000000"

The new design does not only simplify scripts, but also runs more efficiently, as it saves 1 cmdlet execution per subscription switching.

## Limitation

The feature was designed to balance between "supporting more login scenarios" and "being easy to use". Here are the limitations:

- **One subscription, multiple accounts**: when you login Azure PowerShell with multiple user accounts, and there is one subscription owned by more than one of them, it is obvious that `-SubscriptionId` is not enough to tell which context you wish to use, but we do not want to introduce more parameters, so this is not supported.
- Work-around is to log in with only 1 user account.
- **Management-plane only**: as subscription may not make as much sense in data-plane as in management-plane, this feature is suggested to be applied to management-plane cmdlets only.

## Steps

Here are the two simple steps to enable this for your module:
Expand Down