Skip to content

feat: New Terraform module for tracking the version of deployed infra (DBTP-2542)#1398

Open
dragos441 wants to merge 19 commits intomainfrom
DBTP-2542-keep-track-of-platform-version
Open

feat: New Terraform module for tracking the version of deployed infra (DBTP-2542)#1398
dragos441 wants to merge 19 commits intomainfrom
DBTP-2542-keep-track-of-platform-version

Conversation

@dragos441
Copy link
Copy Markdown
Contributor

@dragos441 dragos441 commented Apr 23, 2026

Addresses https://uktrade.atlassian.net/browse/DBTP-2542.
Related PR for platform-orchestration https://github.com/uktrade/platform-orchestration/pull/566
Related PR for e2e tests https://github.com/uktrade/platform-orchestration/pull/566

A new Terraform module called version-tracker that creates an SSM parameter for each one of the 4 Terraform states that comprise the DBT Platform offering. This is intended to track of the version of AWS resources deployed in the wild.

SSM parameter names have the following naming convetion:

Path Notes
platform/version/application/<app>/codebase-pipeline One per application in the non-prod AWS account
platform/version/application/<app>/environment-pipeline One per application, in both the non-prod and prod AWS accounts
platform/version/application/<app>/environment/<env> One for each environment
platform/version/application/<app>/environment/<env>/service/<svc> One for each service in each environment

A benefit of this implementation would be the resource dependency on the previous Terraform module (e.g. environment-pipelines in this example) that contains all other AWS resources. The previous module has to successfully apply first before the SSM parameter in the version-tracker module has its value updated with the new platform version.

module "environment-pipelines" {
  application         = "test-app"
  pipeline_name       = each.key
  repository          = "uktrade/test-app-deploy"
  <other params...>,

}

module "version-tracker" {
  platform_version = "10.1.0"
  application = "test-app",
  <other params...>,
  depends_on = [
      module.environment-pipelines
  ]
}

SSM parameters also provide a log of who & when updated that parameter. The future goal is to have a Platform Helper command that pulls all this data from multiple SSM parameters into a single output output that shows you all the versions of an application's deployed AWS infra.


Checklist:

Title:

Description:

  • Link to ticket included (unless it's a quick out of ticket thing)
  • Includes tests (or an explanation for why it doesn't)
  • If the work includes user interface changes, before and after screenshots included in description
  • Includes any applicable changes to the documentation in this code base
  • Includes link(s) to any applicable changes to the documentation in the DBT Platform Documentation (can be to a pull request)

Tasks:

Reviewer Checklist

  • I have reviewed the PR and ensured no secret values are present

@dragos441 dragos441 requested a review from a team as a code owner April 23, 2026 17:11
@dragos441 dragos441 marked this pull request as draft April 23, 2026 17:12
@github-actions
Copy link
Copy Markdown
Contributor

Your PR has commits that are missing the Signed-off-by trailer. This is likely due to the pre-commit hook not being configured on your local machine. The usual fix for this issue is to run pre-commit install --install-hooks --overwrite -t commit-msg -t pre-commit, however for more detailed help in setting up the pre-commit hooks, follow the instructions at https://github.com/uktrade/github-standards/blob/main/README.md#usage

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Dependency Review

✅ No vulnerabilities or OpenSSF Scorecard issues found.

Scanned Files

None

@dragos441 dragos441 changed the title feat: New Terraform module for tracking platform version (DBTP-2542) feat: New Terraform module for tracking the version of deployed infra (DBTP-2542) Apr 23, 2026
@dragos441 dragos441 marked this pull request as ready for review April 27, 2026 11:58
Comment thread dbt_platform_helper/domain/pipelines.py Outdated
Comment thread dbt_platform_helper/providers/terraform_manifest.py
Comment thread dbt_platform_helper/domain/pipelines.py
dragos441 and others added 2 commits April 29, 2026 12:39
Co-authored-by: Kate Sugden <107400614+ksugden@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants