generated from ministryofjustice/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 290
76 lines (70 loc) · 2.73 KB
/
core-vpc-preproduction-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
---
name: core-vpc-preproduction-deployment
on:
push:
branches:
- main
paths:
- 'environments-networks/*-preproduction.json'
- '.github/workflows/core-vpc-preproduction-deployment.yml'
- 'terraform/environments/**/networking.auto.tfvars.json'
- 'terraform/environments/**/subnet-share.tf'
- '!terraform/environments/core-*/**'
- 'terraform/environments/core-vpc/**'
- 'terraform/modules/core-monitoring/**'
- 'terraform/modules/dns-zone/**'
- 'terraform/modules/dns-zone-extend/**'
- 'terraform/modules/vpc-tgw-routing/**'
- 'terraform/modules/vpc-nacls/**'
- 'terraform/modules/ram-resource-share/**'
- 'terraform/modules/core-vpc-tgw-routes/**'
- 'terraform/modules/r53-dns-firewall/**'
- '.github/workflows/reusable-member-account-ram-association.yml'
- '.github/workflows/reusable_terraform_plan_apply.yml'
- '!**.md'
pull_request:
branches:
- main
paths:
- 'environments-networks/*-preproduction.json'
- '.github/workflows/core-vpc-preproduction-deployment.yml'
- 'terraform/environments/**/networking.auto.tfvars.json'
- 'terraform/environments/**/subnet-share.tf'
- '!terraform/environments/core-*/**'
- 'terraform/environments/core-vpc/**'
- 'terraform/modules/core-monitoring/**'
- 'terraform/modules/dns-zone/**'
- 'terraform/modules/dns-zone-extend/**'
- 'terraform/modules/vpc-tgw-routing/**'
- 'terraform/modules/vpc-nacls/**'
- 'terraform/modules/ram-resource-share/**'
- 'terraform/modules/core-vpc-tgw-routes/**'
- '.github/workflows/reusable-member-account-ram-association.yml'
- '.github/workflows/reusable_terraform_plan_apply.yml'
- '!**.md'
workflow_dispatch:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
pull-requests: write
defaults:
run:
shell: bash
jobs:
core-vpc-preproduction-deployment-plan-apply:
uses: ./.github/workflows/reusable_terraform_plan_apply.yml
with:
working-directory: "terraform/environments/core-vpc"
environment: "preproduction"
secrets:
MODERNISATION_PLATFORM_ACCOUNT_NUMBER: ${{ secrets.MODERNISATION_PLATFORM_ACCOUNT_NUMBER }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}
member-account-ram-association:
needs: core-vpc-preproduction-deployment-plan-apply
if: github.event.ref == 'refs/heads/main'
uses: ./.github/workflows/reusable-member-account-ram-association.yml
with:
environment: "preproduction"
secrets:
MODERNISATION_PLATFORM_ACCOUNT_NUMBER: ${{ secrets.MODERNISATION_PLATFORM_ACCOUNT_NUMBER }}
PASSPHRASE: ${{ secrets.PASSPHRASE }}