generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/ap-ingest-datasync-task
- Loading branch information
Showing
193 changed files
with
4,991 additions
and
2,224 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
name: analytical-platform-common | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'terraform/environments/analytical-platform-common/**' | ||
- '.github/workflows/analytical-platform-common.yml' | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'terraform/environments/analytical-platform-common/**' | ||
- '.github/workflows/analytical-platform-common.yml' | ||
|
||
workflow_dispatch: | ||
inputs: | ||
action: | ||
description: 'Set either [deploy|destroy].' | ||
default: 'deploy' | ||
required: true | ||
type: string | ||
options: | ||
- deploy | ||
- destroy | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
strategy: | ||
uses: ./.github/workflows/reusable_terraform_strategy.yml | ||
if: inputs.action != 'destroy' | ||
with: | ||
application: "${{ github.workflow }}" | ||
|
||
terraform: | ||
needs: strategy | ||
if: inputs.action != 'destroy' | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.strategy.outputs.matrix) }} | ||
uses: ./.github/workflows/reusable_terraform_plan_apply.yml | ||
with: | ||
application: "${{ github.workflow }}" | ||
environment: "${{ matrix.target }}" | ||
action: "${{ matrix.action }}" | ||
secrets: | ||
modernisation_platform_environments: "${{ secrets.MODERNISATION_PLATFORM_ENVIRONMENTS }}" | ||
pipeline_github_token: "${{ secrets.MODERNISATION_PLATFORM_CI_USER_ENVIRONMENTS_REPO_PAT }}" | ||
|
||
destroy-development: | ||
if: inputs.action == 'destroy' | ||
uses: ./.github/workflows/reusable_terraform_plan_apply.yml | ||
with: | ||
application: "${{ github.workflow }}" | ||
environment: "development" | ||
action: "plan_apply" | ||
plan_apply_tfargs: "-destroy" | ||
secrets: | ||
modernisation_platform_environments: "${{ secrets.MODERNISATION_PLATFORM_ENVIRONMENTS }}" | ||
pipeline_github_token: "${{ secrets.MODERNISATION_PLATFORM_CI_USER_ENVIRONMENTS_REPO_PAT }}" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
name: youth-justice-app-framework | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'terraform/environments/youth-justice-app-framework/**' | ||
- '.github/workflows/youth-justice-app-framework.yml' | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'terraform/environments/youth-justice-app-framework/**' | ||
- '.github/workflows/youth-justice-app-framework.yml' | ||
|
||
workflow_dispatch: | ||
inputs: | ||
action: | ||
description: 'Set either [deploy|destroy].' | ||
default: 'deploy' | ||
required: true | ||
type: string | ||
options: | ||
- deploy | ||
- destroy | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
|
||
jobs: | ||
strategy: | ||
uses: ./.github/workflows/reusable_terraform_strategy.yml | ||
if: inputs.action != 'destroy' | ||
with: | ||
application: "${{ github.workflow }}" | ||
|
||
terraform: | ||
needs: strategy | ||
if: inputs.action != 'destroy' | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.strategy.outputs.matrix) }} | ||
uses: ./.github/workflows/reusable_terraform_plan_apply.yml | ||
with: | ||
application: "${{ github.workflow }}" | ||
environment: "${{ matrix.target }}" | ||
action: "${{ matrix.action }}" | ||
secrets: | ||
modernisation_platform_environments: "${{ secrets.MODERNISATION_PLATFORM_ENVIRONMENTS }}" | ||
pipeline_github_token: "${{ secrets.MODERNISATION_PLATFORM_CI_USER_ENVIRONMENTS_REPO_PAT }}" | ||
|
||
destroy-development: | ||
if: inputs.action == 'destroy' | ||
uses: ./.github/workflows/reusable_terraform_plan_apply.yml | ||
with: | ||
application: "${{ github.workflow }}" | ||
environment: "development" | ||
action: "plan_apply" | ||
plan_apply_tfargs: "-destroy" | ||
secrets: | ||
modernisation_platform_environments: "${{ secrets.MODERNISATION_PLATFORM_ENVIRONMENTS }}" | ||
pipeline_github_token: "${{ secrets.MODERNISATION_PLATFORM_CI_USER_ENVIRONMENTS_REPO_PAT }}" |
This file contains 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
76 changes: 76 additions & 0 deletions
76
terraform/environments/analytical-platform-common/README.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Service Runbook | ||
|
||
<!-- This is a template that should be populated by the development team when moving to the modernisation platform, but also reviewed and kept up to date. | ||
To ensure that people looking at your runbook can get the information they need quickly, your runbook should be short but clear. Throughout, only use acronyms if you’re confident that someone who has just been woken up at 3am would understand them. --> | ||
|
||
_If you have any questions surrounding this page please post in the `#team-name` channel._ | ||
|
||
## Mandatory Information | ||
|
||
### **Last review date:** | ||
|
||
<!-- Adding the last date this page was reviewed, with any accompanying information --> | ||
|
||
### **Description:** | ||
|
||
<!-- A short (less than 50 word) description of what your service does, and who it’s for.--> | ||
|
||
### **Service URLs:** | ||
|
||
<!-- The URL(s) of the service’s production environment, and test environments if possible--> | ||
|
||
### **Incident response hours:** | ||
|
||
<!-- When your service receives support for urgent issues. This should be written in a clear, unambiguous way. For example: 24/7/365, Office hours, usually 9am-6pm on working days, or 7am-10pm, 365 days a year. --> | ||
|
||
### **Incident contact details:** | ||
|
||
<!-- How people can raise an urgent issue with your service. This must not be the email address or phone number of an individual on your team, it should be a shared email address, phone number, or website that allows someone with an urgent issue to raise it quickly. --> | ||
|
||
### **Service team contact:** | ||
|
||
<!-- How people with non-urgent issues or questions can get in touch with your team. As with incident contact details, this must not be the email address or phone number of an individual on the team, it should be a shared email address or a ticket tracking system.--> | ||
|
||
### **Hosting environment:** | ||
|
||
Modernisation Platform | ||
|
||
<!-- If your service is hosted on another MOJ team’s infrastructure, link to their runbook. If your service has another arrangement or runs its own infrastructure, you should list the supplier of that infrastructure (ideally linking to your account’s login page) and describe, simply and briefly, how to raise an issue with them. --> | ||
|
||
## Optional | ||
|
||
### **Other URLs:** | ||
|
||
<!-- If you can, provide links to the service’s monitoring dashboard(s), health checks, documentation (ideally describing how to run/work with the service), and main GitHub repository. --> | ||
|
||
### **Expected speed and frequency of releases:** | ||
|
||
<!-- How often are you able to release changes to your service, and how long do those changes take? --> | ||
|
||
### **Automatic alerts:** | ||
|
||
<!-- List, briefly, problems (or types of problem) that will automatically alert your team when they occur. --> | ||
|
||
### **Impact of an outage:** | ||
|
||
<!-- A short description of the risks if your service is down for an extended period of time. --> | ||
|
||
### **Out of hours response types:** | ||
|
||
<!-- Describe how incidents that page a person on call are responded to. How long are out-of-hours responders expected to spend trying to resolve issues before they stop working, put the service into maintenance mode, and hand the issue to in-hours support? --> | ||
|
||
### **Consumers of this service:** | ||
|
||
<!-- List which other services (with links to their runbooks) rely on this service. If your service is considered a platform, these may be too numerous to reasonably list. --> | ||
|
||
### **Services consumed by this:** | ||
|
||
<!-- List which other services (with links to their runbooks) this service relies on. --> | ||
|
||
### **Restrictions on access:** | ||
|
||
<!-- Describe any conditions which restrict access to the service, such as if it’s IP-restricted or only accessible from a private network.--> | ||
|
||
### **How to resolve specific issues:** | ||
|
||
<!-- Describe the steps someone might take to resolve a specific issue or incident, often for use when on call. This may be a large amount of information, so may need to be split out into multiple pages, or link to other documents.--> |
16 changes: 16 additions & 0 deletions
16
terraform/environments/analytical-platform-common/application_variables.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"accounts": { | ||
"development": { | ||
"example_var": "dev-data" | ||
}, | ||
"test": { | ||
"example_var": "test-data" | ||
}, | ||
"preproduction": { | ||
"example_var": "preproduction-data" | ||
}, | ||
"production": { | ||
"example_var": "production-data" | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#### This file can be used to store data specific to the member account #### |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#### This file can be used to store locals specific to the member account #### |
9 changes: 9 additions & 0 deletions
9
terraform/environments/analytical-platform-common/networking.auto.tfvars.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"networking": [ | ||
{ | ||
"business-unit": "platforms", | ||
"set": "general", | ||
"application": "analytical-platform-common" | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
terraform/environments/analytical-platform-common/platform_backend.tf
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Backend | ||
terraform { | ||
# `backend` blocks do not support variables, so the following are hard-coded here: | ||
# - S3 bucket name, which is created in modernisation-platform-account/s3.tf | ||
backend "s3" { | ||
acl = "bucket-owner-full-control" | ||
bucket = "modernisation-platform-terraform-state" | ||
dynamodb_table = "modernisation-platform-terraform-state-lock" | ||
encrypt = true | ||
key = "terraform.tfstate" | ||
region = "eu-west-2" | ||
workspace_key_prefix = "environments/members/analytical-platform-common" # This will store the object as environments/members/analytical-platform-common/${workspace}/terraform.tfstate | ||
} | ||
} |
Oops, something went wrong.