Skip to content

Switch to Microsoft supported terraform extension in Azure Pipelines #252

Merged
Kamil-Biegaj-HM merged 65 commits intomasterfrom
feature/terraform-migration
Feb 27, 2026
Merged

Switch to Microsoft supported terraform extension in Azure Pipelines #252
Kamil-Biegaj-HM merged 65 commits intomasterfrom
feature/terraform-migration

Conversation

@Kamil-Biegaj-HM
Copy link
Copy Markdown
Contributor

@Kamil-Biegaj-HM Kamil-Biegaj-HM commented Jan 16, 2026

Jira link

See PROJ-28023

Change description

This PR completes the central part of the migration from the deprecated TerraformCLI@2 extension to Microsoft’s supported Terraform extension (ms-devlabs.custom-terraform-tasks).
As part of the migration, terraform.yaml now supports overriding backend configuration (resource group, storage account, container, and key) while still using the Microsoft task. This removes the need for initCommandOptions in consuming repos and avoids backend config clashes that occur when the Microsoft extension auto-injects backend parameters.

Specifically:

Added optional parameters:
backendResourceGroupName
backendStorageAccountName
backendContainerName
backendKey
Default behaviour remains unchanged (HMCTS control backend with standard naming) if parameters are not supplied.
Enables legacy/backward-compatible backend layout for heritage pipelines while still using the Microsoft extension.

Testing done

Manually tested via oracle-azure-infrastructure pipeline using the updated overrides.
Verified terraform init completes successfully for automation_account with the Microsoft extension (backend resolved via override parameters).

Security Vulnerability Assessment

CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?

  • Yes
  • [X ] No

Checklist

  • [X ] commit messages are meaningful and follow good commit message guidelines
  • [X ] README and other documentation has been updated / added (if needed)
  • [X ] tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

@Kamil-Biegaj-HM Kamil-Biegaj-HM marked this pull request as draft January 28, 2026 14:54
@Kamil-Biegaj-HM Kamil-Biegaj-HM marked this pull request as ready for review February 23, 2026 12:31
@Kamil-Biegaj-HM Kamil-Biegaj-HM merged commit 81eaed8 into master Feb 27, 2026
1 check passed
@Kamil-Biegaj-HM Kamil-Biegaj-HM deleted the feature/terraform-migration branch February 27, 2026 13:32
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.

2 participants