DSTA-669: Add bootstrap support for backend resources - #67
Merged
Conversation
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
4 times, most recently
from
August 26, 2026 14:09
0556049 to
3ea9609
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Azure Bicep bootstrap support for Terraform backend infrastructure.
Changes:
- Adds environment-aware make targets and bootstrap orchestration.
- Provisions private Terraform state storage, DNS, endpoint, RBAC, and resource groups.
- Adds infrastructure documentation and adjusts CI workflows.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
Makefile |
Integrates bootstrap targets and revises setup commands. |
.gitattributes |
Enforces LF endings for scripts. |
.github/workflows/cicd-1-pull-request.yaml |
Inlines version generation and variable output. |
.github/workflows/stage-1-commit.yaml |
Disables Terraform linting. |
scripts/make/environment.mk |
Defines development and production contexts. |
scripts/make/bootstrap.mk |
Adds the bootstrap target. |
scripts/make/azure.mk |
Selects and resolves Azure subscriptions. |
scripts/bootstrap/run_bootstrap.sh |
Runs prerequisite checks, preview, and deployment. |
infrastructure/bootstrap/main.bicep |
Coordinates bootstrap resources. |
infrastructure/bootstrap/terraformStorage.bicep |
Creates Terraform state storage and RBAC. |
infrastructure/bootstrap/privateEndpoint.bicep |
Creates private storage connectivity. |
infrastructure/bootstrap/dns.bicep |
Resolves the private DNS zone. |
infrastructure/environments/dev/variables.sh |
Supplies development settings. |
infrastructure/environments/prod/variables.sh |
Supplies placeholder production settings. |
infrastructure/README.md |
Documents bootstrap architecture and usage. |
Suppressed comments (2)
Makefile:34
- These are recipe lines, so Bash tries to execute
_install-tools,_install-uv,githooks-config, anddependenciesas commands; none of the first two exist anywhere in the repository, and the latter two are make targets rather than executables. Consequently, the documentedmake configfails immediately. Invoke available targets through$(MAKE)and restore or define the intended installation targets.
_install-tools
_install-uv
githooks-config
dependencies
Makefile:52
- The repository has no default
.pre-commit-config.yaml; its only configuration isscripts/config/pre-commit.yaml. Callingpre-commit installwithout--configtherefore fails instead of installing the hooks.
pre-commit install
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
10 tasks
|
Rework from #66 |
saliceti
reviewed
Aug 26, 2026
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
2 times, most recently
from
August 26, 2026 17:27
935bf05 to
465d905
Compare
micjustus-nc
marked this pull request as ready for review
August 26, 2026 17:29
saliceti
reviewed
Aug 27, 2026
saliceti
reviewed
Aug 27, 2026
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
from
August 27, 2026 14:41
a1b2f16 to
b290a5c
Compare
samw-nhs
approved these changes
Aug 27, 2026
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
from
August 27, 2026 14:44
b290a5c to
52401d5
Compare
Include separate make files for azure, bootstrap, environment, shared to contain focused targets. Azure.mk contains Azure-related make targets, Bootstrap.mk contains bootstrap-related make targets, Environment.mk contains environment-related make targets. Makefile only contains targets required as an orchestrator to other make file targets. Updates to README for improved wording and to ensure it reflects content of the current PR. Ensure usage of init.mk works as part of the main makefile since it was part of the base template. Ensure only required make targets and environments are part of this PR. prod environment folder not part of this PR yet as we focused only on dev deployment. main.bicep builds the resource group name using the appShortName variable so that naming is consistent across environments. .gitattributes updated to ensure Git handles newlines consistently for all files.
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
from
August 27, 2026 15:19
52401d5 to
5281f93
Compare
saliceti
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
These changes bring in support for the ability to bootstrap (create on first run) the needed Terraform resources in a target environment.
Context
To run the bootstrap on Windows, use Bash WSL
In the terminal
az loginto authenticate to the cloud mind (tenant/subscription)make dev bootstrapThe bootstrap flow validates prerequisites (like the required Entra group
screening_nbss_devand subscription contexts), runs a what-if preview, and then deploys bootstrap resources after confirmation.Why is this required?
This is required because Terraform deployments rely on remote backend state.
terraform-initexpectes the backend state to already exist. So, the bootstrap process provisions the prerequisites so Terraform can initialise, plan and apply its changes safely.Deployment model
This set of changes uses Bicep-based Azure deployments to create Terraform backend prerequisites.
To view the deployments after
make dev bootstraprun,Deployment resources
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.