Build Bicep sources or validate Terraform examples under $Path.
Routes to the engine matching the module's ecosystem:
- bicep -> Invoke-AvmBicepTest ('bicep build --stdout' per file)
- terraform -> Invoke-AvmTerraformTest ('terraform validate -json' per example with auto-init)
The ecosystem is determined by Get-AvmModuleContext, which honours the .avm/context.psd1 override file and the -Ecosystem filter.
This verb covers the cheap build-validation pass and runs no tests: it reports FilesProcessed (Bicep sources or direct Terraform example configuration files) and carries no run counts. The real test tiers are the separate 'avm test unit', 'avm test integration' and 'avm test e2e' verbs, which report test run counts (Bicep Pester or Terraform tests). In the gauntlets this verb is the step named 'validate' for that reason.
Terraform includes .e2eignore examples and warns when the root module or an immediate modules/ configuration is not reached by a local example. Coverage gaps do not fail validation. No examples is skipped.
Routed by the dispatcher: 'avm test'.
avm test
Invoke-AvmTest [[-Path] <string>] [-Ecosystem <string>] [-AllowPathFallback] [-NoInit] [-UseExistingInit] [-SkipModuleVersionCheck] [<CommonParameters>]When set, accept a PATH-resolved tool binary that self-reports the lock-pinned version.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Force the ecosystem selector. Defaults to 'auto'.
| Property | Value |
|---|---|
| Type | String |
| Required | false |
| Position | named |
| Default value | auto |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Terraform-only: skip each example's 'terraform init -backend=false -upgrade' step and use its existing initialization. Module coverage is not assessed with this switch and reports a warning. Ignored for Bicep.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Working directory whose enclosing module to test. Defaults to the current location.
| Property | Value |
|---|---|
| Type | String |
| Required | false |
| Position | 1 |
| Default value | $PWD.Path |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Skip the PowerShell Gallery check that otherwise stops the command when a newer Avm.Authoring version is available. Writes a warning once.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
Terraform-only: reuse initialization prepared by a composite command and assess module coverage from each example's existing '.terraform/modules/modules.json'.
| Property | Value |
|---|---|
| Type | Switch |
| Required | false |
| Position | named |
| Default value | False |
| Accept pipeline input | false |
| Accept wildcard characters | false |
avm testInvoke-AvmTest -Path C:\repos\my-module -Ecosystem biceppscustomobject from the engine: Engine, Tool, ToolPath, ToolSource, Status, FilesProcessed, Issues.