Select a Bicep test subscription using the repository's exact reservation map.
Validates the complete explicit subscription pool and the repository-root .reserved-test-subscriptions.json, then selects within the owning module's tag using the native seeded, order-independent permutation. Unmapped modules use General. A missing tag never falls back to another tag.
An optional exact example directory or main.test.bicep path is resolved through native recursive test discovery. Its owning module, not a parent identity root, determines the reservation. Missing, ignored, ambiguous or miscased examples fail; short-name aliases and path normalization are not used. Without Example, ModulePath is the exact reservation lookup path.
The returned original pool index and canonical subscription digest allow a caller to repeat selection and verify its matrix binding before login. This read-only command never compiles, signs in, registers prerequisites, prepares infrastructure or deploys. A non-General result does not authorize native e2e execution; reserved environments still require their protected registry lifecycle. No ambient pool or singleton fallback is read.
Select-AvmTestSubscription [-Path] <string> [-ModulePath] <string> [[-Example] <string>] [-TestSubscriptionIds] <string> [[-RandomSeed] <int>] [[-CaseIndex] <int>] [-SkipModuleVersionCheck] [<CommonParameters>]Nonnegative round-robin position within the selected tag's permutation. This is not an original pool index. Defaults to zero.
| Property | Value |
|---|---|
| Type | Int32 |
| Required | false |
| Position | 6 |
| Default value | 0 |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Optional exact module-relative test directory or main.test.bicep path, using forward slashes and actual casing. Native discovery determines the owning module for nested examples and source-less family roots.
| Property | Value |
|---|---|
| Type | String |
| Required | false |
| Position | 3 |
| Default value | |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Exact lowercase repository-relative Bicep module path, using forward slashes, such as avm/res/storage/storage-account. Reservations are not inherited from parent or child paths.
| Property | Value |
|---|---|
| Type | String |
| Required | true |
| Position | 2 |
| Default value | |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Existing filesystem repository root containing the exact reservation map. This is authoritative; the command never searches parent directories.
| Property | Value |
|---|---|
| Type | String |
| Required | true |
| Position | 1 |
| Default value | |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Nonnegative seed for the stable subscription permutation. Defaults to zero.
| Property | Value |
|---|---|
| Type | Int32 |
| Required | false |
| Position | 5 |
| Default value | 0 |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Skip the PowerShell Gallery version check for source or offline callers. A warning is written once. Selection itself makes no network calls.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Complete nonempty JSON array of id/name objects with optional tag strings. Missing tags mean General. The entire pool is validated before filtering, including duplicate subscription GUIDs across different tags.
| Property | Value |
|---|---|
| Type | String |
| Required | true |
| Position | 4 |
| Default value | |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Select-AvmTestSubscription -Path $repo -ModulePath 'avm/res/storage/storage-account' -TestSubscriptionIds $pool -RandomSeed 42 -CaseIndex 3 -SkipModuleVersionCheck
Selects a subscription for the exact module without reading Azure state.Select-AvmTestSubscription -Path $repo -ModulePath 'avm/res/network/virtual-network' -Example 'subnet/tests/e2e/defaults' -TestSubscriptionIds $pool -RandomSeed 42 -SkipModuleVersionCheck
Uses the discovered subnet module's exact reservation, not its parent's.PSCustomObject with ModulePath, SubscriptionId, Name, Tag, Index and Key. ModulePath identifies the owning module. Index is the original zero-based pool index. SubscriptionId preserves its supplied spelling; Key is lowercase SHA-256 hex over the lowercase canonical GUID D representation.