DSTA-669: Incorporate boostrap from previous repo - #66
Closed
micjustus-nc wants to merge 8 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a bootstrap workflow to provision Azure prerequisites (Terraform remote state backend + private connectivity) via Bicep, and wires the flow into make targets so environments can be initialized consistently before running Terraform.
Changes:
- Introduces
maketargets for environment selection, Azure subscription context, bootstrap orchestration, and Terraform operations. - Adds Bicep templates + a Bash orchestrator to validate prerequisites, run
what-if, and deploy bootstrap resources. - Documents the bootstrap flow and normalizes LF endings for shell/scripts to reduce CRLF-related issues.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| Makefile | Replaces template Makefile with make-based bootstrap/terraform workflow entrypoints. |
| scripts/make/shared.mk | Adds asdf tool installation and a custom help renderer shared across make targets. |
| scripts/make/environment.mk | Adds dev/prod environment selector targets that load per-environment variables. |
| scripts/make/bootstrap.mk | Adds bootstrap target to run the bootstrap orchestrator script with resolved inputs. |
| scripts/make/azure.mk | Adds Azure CLI subscription selection and subscription ID resolution targets. |
| scripts/make/terraform.mk | Adds Terraform init/plan/apply/destroy targets and module-fetching behavior. |
| scripts/bash/run_bootstrap.sh | Adds bootstrap orchestration (prereq validation, what-if, deploy, output). |
| infrastructure/bootstrap/main.bicep | Subscription-scope bootstrap orchestration module (state storage + DNS + private endpoint + infra RG). |
| infrastructure/bootstrap/terraformStorage.bicep | Creates locked-down state storage account/container + RBAC assignment. |
| infrastructure/bootstrap/dns.bicep | Looks up private DNS zones for private endpoint integration. |
| infrastructure/bootstrap/privateEndpoint.bicep | Creates private endpoint and DNS zone group registration. |
| infrastructure/environments/dev/variables.sh | Adds dev environment variables used by make/bootstrap. |
| infrastructure/environments/prod/variables.sh | Adds prod placeholders for environment variables used by make/bootstrap. |
| infrastructure/README.md | Adds bootstrap/terraform workflow documentation and usage guidance. |
| .gitattributes | Enforces LF endings for scripts/shell files to prevent WSL/shebang CRLF failures. |
Suppressed comments (2)
scripts/bash/run_bootstrap.sh:112
- If
infra-resource-group-nameis provided, it should be passed through to the Bicep deployment asinfraResourceGroupNameso it actually takes effect.
mainBicepParams=(
enableSoftDelete="$ENABLE_SOFT_DELETE"
envConfig="$ENV_CONFIG"
region="$REGION"
storageAccountRGName="$STORAGE_ACCOUNT_RG"
infrastructure/README.md:61
- Typo in Mermaid title: "Boostrap" should be "Bootstrap".
title: Boostrap process flow
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
micjustus-nc
marked this pull request as draft
August 25, 2026 11:22
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
from
August 25, 2026 16:17
9562866 to
e6372f2
Compare
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
from
August 25, 2026 16:22
e6372f2 to
d4a2318
Compare
micjustus-nc
marked this pull request as ready for review
August 25, 2026 16:23
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
from
August 26, 2026 08:36
7fd772c to
68c3119
Compare
saliceti
reviewed
Aug 26, 2026
saliceti
reviewed
Aug 26, 2026
micjustus-nc
marked this pull request as draft
August 26, 2026 09:19
Update Lint Terraform pre-commit hook to manual to prevent scanning
micjustus-nc
force-pushed
the
feat/DSTA-669-add-bootstrap
branch
from
August 26, 2026 10:46
68c3119 to
d60f792
Compare
micjustus-nc
marked this pull request as ready for review
August 26, 2026 11:24
|
Closed in favour of #67 |
10 tasks
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.
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.