Manual Test Runbook — F6: State-Backend Module
Owner: Sagar | Time: ~20 min | Sandbox: snowops-sandbox-01
Prerequisites
- Sandbox subscription access active (PIM activated if required)
-
az logindone;az account showconfirms the sandbox subscription is selected - Identity has Storage Blob Data Contributor on the sandbox subscription
- Local tooling:
terraform >= 1.6,go >= 1.22,az CLI >= 2.50 -
SNOWOPS_SANDBOX_SUBSCRIPTION_IDandSNOWOPS_SANDBOX_TENANT_IDenv vars set - Working directory: repo root
Steps
Part A — terraform validate (no cloud, ~1 min)
- Run the validate-only test to confirm the HCL compiles cleanly:
- Confirm output ends with
PASS.
Part B — full integration test (real Azure, ~15 min)
- Ensure env vars are exported:
export SNOWOPS_SANDBOX_SUBSCRIPTION_ID="<sandbox-subscription-guid>"
export SNOWOPS_SANDBOX_TENANT_ID="<sandbox-tenant-guid>"
- Run the integration test:
cd tests/terratest
go test -v -tags integration -timeout 20m ./modules/azure/... -run TestStateBackendModule
- Watch the output for these key steps:
InitAndApplyonstate-backendfixture → storage account createdInitAndApplyonstate-backend-consumerfixture → uses SA as backend- Both
Destroycalls succeed in reverse order (consumer first, then backend)
Part C — manual spot-check (optional, ~2 min)
- While the test is running (after step A's apply completes, before destroy), you can verify the storage account in the portal or via CLI:
az storage account list --resource-group "snowops-f6-test-*-rg" \
--query "[].{name:name, replication:sku.name, tls:minimumTlsVersion}" \
--output table
Expected: sku.name = Standard_RAGZRS, minimumTlsVersion = TLS1_2.
- Verify the state blob exists in the container during the consumer apply:
az storage blob list \
--account-name "<sa-name-from-test-output>" \
--container-name tfstate \
--auth-mode login \
--output table
Expected: one blob named f6-probe-<suffix>.tfstate.
Pass criteria
-
TestStateBackendValidatepasses (no cloud needed) -
TestStateBackendModulepasses end-to-end (real Azure apply + destroy) - Storage account created with
Standard_RAGZRSreplication -
primary_blob_endpointoutput containsblob.core.windows.net - Consumer fixture successfully used the SA as Terraform backend
-
lock_probe_outputequalsf6-lock-probe-ok - Both destroy calls complete without error (ephemeral=true tag present)
- No orphaned resource groups remain after the test
Teardown
The test fixture tags all resources ephemeral=true. If the test fails mid-run
and resources are orphaned, clean up manually:
Or the X7 nightly cleanup workflow will remove them within 24h.
Sign-off
- Tester: _ | Date: _ | Result: PASS / FAIL / N/A
- Notes: