|
1 | 1 | # .github/workflows/destroy.yml |
2 | 2 |
|
3 | | -name: 'Destroy (Select Account) Environment' |
| 3 | +name: "Destroy (Select Account) Environment" |
4 | 4 |
|
5 | 5 | on: |
6 | 6 | workflow_dispatch: |
7 | 7 | inputs: |
8 | 8 | build_branch: |
9 | | - default: 'main' |
10 | | - description: 'Branch to use for the destroy action.' |
| 9 | + default: "main" |
| 10 | + description: "Branch to use for the destroy action." |
11 | 11 | required: true |
12 | 12 | sandbox_workspace: |
13 | | - description: 'The sandbox workspace to destroy.' |
| 13 | + description: "The sandbox workspace to destroy." |
14 | 14 | required: true |
15 | 15 | terraform_vars: |
16 | | - default: 'dev.tfvars' |
17 | | - description: 'Terraform vars file to use.' |
| 16 | + default: "dev.tfvars" |
| 17 | + description: "Terraform vars file to use." |
18 | 18 | required: true |
19 | 19 | environment: |
20 | | - default: 'development' |
21 | | - description: 'Environment for destruction.' |
| 20 | + default: "development" |
| 21 | + description: "Environment for destruction." |
22 | 22 | required: true |
23 | 23 | backend: |
24 | | - default: 'backend.conf' |
25 | | - description: 'Terraform backend configuration.' |
| 24 | + default: "backend.conf" |
| 25 | + description: "Terraform backend configuration." |
26 | 26 | required: true |
27 | 27 | workflow_call: |
28 | 28 | inputs: |
29 | 29 | build_branch: |
30 | | - default: 'main' |
31 | | - description: 'Branch to use for the destroy action.' |
| 30 | + default: "main" |
| 31 | + description: "Branch to use for the destroy action." |
32 | 32 | required: true |
33 | 33 | type: "string" |
34 | 34 | sandbox_workspace: |
35 | | - description: 'The sandbox workspace to destroy.' |
| 35 | + description: "The sandbox workspace to destroy." |
36 | 36 | required: true |
37 | 37 | type: "string" |
38 | 38 | terraform_vars: |
39 | | - default: 'dev.tfvars' |
40 | | - description: 'Terraform vars file to use.' |
| 39 | + default: "dev.tfvars" |
| 40 | + description: "Terraform vars file to use." |
41 | 41 | required: true |
42 | 42 | type: "string" |
43 | 43 | environment: |
44 | | - default: 'development' |
45 | | - description: 'Environment for destruction.' |
| 44 | + default: "development" |
| 45 | + description: "Environment for destruction." |
46 | 46 | required: true |
47 | 47 | type: "string" |
48 | 48 | backend: |
49 | | - default: 'backend.conf' |
50 | | - description: 'Terraform backend configuration.' |
| 49 | + default: "backend.conf" |
| 50 | + description: "Terraform backend configuration." |
51 | 51 | required: true |
52 | 52 | type: "string" |
53 | 53 |
|
|
62 | 62 | uses: ./.github/workflows/cleanup-cloudfront-edge-associations.yml |
63 | 63 | with: |
64 | 64 | sandbox_workspace: ${{ inputs.sandbox_workspace }} |
65 | | - lambda_function_name: '${{ inputs.sandbox_workspace }}_EdgePresignLambda' |
| 65 | + lambda_function_name: "${{ inputs.sandbox_workspace }}_EdgePresignLambda" |
66 | 66 | python_version: 3.11 |
67 | 67 | build_branch: ${{ inputs.build_branch }} |
68 | 68 | environment: ${{ inputs.environment}} |
@@ -131,3 +131,6 @@ jobs: |
131 | 131 |
|
132 | 132 | - name: Run Terraform Workspace Cleanup Script |
133 | 133 | run: ./venv/bin/python3 -u scripts/cleanup_terraform_states.py ${{ inputs.sandbox_workspace }} |
| 134 | + |
| 135 | + - name: Run Log Group Cleanup Script |
| 136 | + run: ./venv/bin/python3 -u scripts/cleanup_log_groups.py ${{ inputs.sandbox_workspace }} |
0 commit comments