Skip to content

ci: add Azure integration tests GitHub Actions workflow#1794

Open
james00012 wants to merge 1 commit intomainfrom
ci/azure-github-actions
Open

ci: add Azure integration tests GitHub Actions workflow#1794
james00012 wants to merge 1 commit intomainfrom
ci/azure-github-actions

Conversation

@james00012
Copy link
Copy Markdown
Contributor

@james00012 james00012 commented Apr 24, 2026

Adds .github/workflows/azure-integration-tests.yml — runs Azure integration tests against a real subscription via GitHub OIDC + azure/login@v2 + ARM_USE_OIDC=true. No client secret stored. Fork PRs are blocked at the job level so secrets are never exposed.

Complementary to existing azure-tests.yml (compile-only on test/azure/, unit tests on modules/azure/). Replaces #1793 (closed; was opened from a fork, where the same fork-PR guard prevented the workflow from running).

Scope

The AzureRM provider gained OIDC support in 3.7.0. 21 of 23 Azure example modules pin AzureRM 2.x and cannot auth via OIDC. This PR therefore scopes the run to the two examples already on 3.x:

  • TestTerraformAzureContainerAppExample
  • TestTerraformAzureKeyVaultExample

Bringing the remaining 21 under CI requires a separate provider-upgrade effort.

Subscription prerequisites (to land green)

  • Register Microsoft.App resource provider on the subscription (az provider register --namespace Microsoft.App) — currently blocks Container App with 409 MissingSubscriptionRegistration.
  • terraform-azure-keyvault-example imports a hardcoded test cert that's expired — separate fix needed in the example.

Out of scope

  • Upgrading 21 example modules from AzureRM 2.x.
  • Verifying Azure AD federated credential trust scope (Yousif).
  • Deleting stale AZURE_CREDENTIALS secret (Yousif).

@james00012 james00012 marked this pull request as ready for review April 25, 2026 22:07
Runs `go test -tags azure ./test/azure/...` against a real Azure
subscription via GitHub OIDC + `azure/login@v2` + `ARM_USE_OIDC=true`.
No client secret stored. Fork PRs are blocked at the job level so
secrets are never exposed. A `concurrency:` group cancels superseded
runs on the same ref.

Scope: 21 of 23 Azure example modules pin AzureRM 2.x, which predates
the provider's OIDC support (added in 3.7.0). The test run is therefore
narrowed to the two modules already on AzureRM 3.x:

  - TestTerraformAzureContainerAppExample
  - TestTerraformAzureKeyVaultExample

Bringing the remaining 21 under CI requires a separate provider-upgrade
effort.

Also fixes a pre-existing bug in the Key Vault example: the hardcoded
example.pfx test cert (CN=testing.com) had expired on 2024-06-15,
causing TestTerraformAzureKeyVaultExample to fail at import time with
"X509 Certificate is already expired". Regenerated as a 100-year
self-signed cert with the same subject and password, in legacy PKCS#12
format for Azure Key Vault compatibility.

Uses `set -o pipefail` so go test failures aren't masked by tee's exit
code (the pipeline would otherwise produce false-green workflow runs).
@james00012 james00012 force-pushed the ci/azure-github-actions branch from 2aeb14f to 59a2297 Compare April 25, 2026 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant