Azure Local module testing
The shared Azure Local fixture provides a reserved environment for supported module examples. Coordinate fixture access and repository configuration with the AVM maintainers.
Bicep examples
In Azure/bicep-registry-modules, the central pr-check.yml workflow routes selected tests for modules listed as Azure Local in .reserved-test-subscriptions.json to the shared fixture. Coordinate additions to that mapping with maintainers and ensure every selected E2E test template is wired to consume the fixture:
- Declare
resourceGroupName; the workflow supplies a disposable per-run resource group. Do not override it with a different value. - For the cluster module, declare
hciHostImageReferenceIdand use it as the host image reference. - For other consumers, declare an object parameter named
preparedHciEnvironmentand use the neededcustomLocationResourceId,vSwitchName, andkubernetesVersionvalues in the example. If the template declareshciHostImageReferenceId, the workflow supplies that too.
The workflow checks fixture readiness, acquires a consumer lease, and passes these values as parameter overrides. It releases the lease only after cleanup is confirmed; it does not provision the fixture during the PR check.
Terraform examples
For a supported consumer repository, declare the inputs your examples need. The centrally managed terraform-module.yml E2E workflow uses AVM_AZURE_LOCAL_ENVIRONMENT_ADAPTER to map those inputs to shared environment fields and supplies the values as TF_VAR_* environment variables. Declare each mapped input in every selected example. Supported projection fields are subscriptionId, tenantId, location, imageVersionResourceId, clusterResourceId, customLocationResourceId, logicalNetworkResourceId, vSwitchName, and kubernetesVersion.
Adapter provisioning is planned for automation; coordinate its availability with AVM maintainers. Repository sync activates supported consumers after the adapter and centrally managed AVM_AZURE_LOCAL_ENVIRONMENT_LOCK configuration and permissions are available. It publishes the lock and AVM_AZURE_LOCAL_ENVIRONMENT_MODE as consumer; coordinate this activation with maintainers rather than constructing the lock yourself. Lifecycle and migration repositories retain their existing E2E path; their shared-fixture integration is not yet implemented.
Validation and end-to-end testing
Follow the Bicep contribution flow or Terraform contribution flow for local validation and the central PR checks. E2E deployments are separate from local avm pr-check; use the relevant PR labels to select required or all E2E examples.
For a manual Bicep run, open Actions > .Module - PR Check, select the module path, set runE2E to true, and leave keepResources as false. Azure Local tests require cleanup. Automatic E2E needs a prepared fixture in the reserved subscription.
Create or recreate the environment
An authorized maintainer can run Actions > .Platform - Manage reserved Azure Local environment in Azure/bicep-registry-modules. The workflow selects the single subscription tagged Azure Local in the configured test pool and fails if there are none or more than one.
- Select
statusto inspect the fixture, orprepareto create or prepare it. - Select
recreateto remove the registered fixture resource groups and rebuild the environment. This selection authorizes that destructive operation; do not use it merely to check status. - Select
teardownonly when the environment should be removed.
There is no user-facing mode input. The workflow uses the lifecycle lease mode for maintenance; E2E consumers use consumer mode. Check the workflow result and fixture readiness before running E2E tests.