Skip to content

Commit 7bcbde3

Browse files
committed
[PRMP-580] Update cron and delay continuous workspace teardown
1 parent f618645 commit 7bcbde3

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

.github/workflows/cron-tear-down-sandbox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 'Z-CRON: Tear down - Sandboxes'
22

33
on:
44
schedule:
5-
- cron: 59 17 * * 1-5 # utc time
5+
- cron: 59 18-21 * * 1-5 # utc time
66

77
permissions:
88
pull-requests: write

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ This repository is used to build the infrastructure the NDR. That is it's sole p
77
- [Terraform](https://developer.hashicorp.com/terraform/install)
88
- [Terraform docs](https://github.com/terraform-docs/terraform-docs)
99

10-
To install terraform-docs on WSL use the following command
10+
To install terraform-docs on WSL use the following commands (e.g. for v0.20.0):
1111
```
12-
curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.20.0/terraform-docs-v0.20.0-$(uname)-amd64.tar.gz &&
13-
tar -xzf terraform-docs.tar.gz &&
14-
chmod +x terraform-docs &&
15-
sudo mv terraform-docs /usr/local/bin/terraform-docs &&
12+
curl -sSLo ./terraform-docs.tar.gz https://terraform-docs.io/dl/v0.20.0/terraform-docs-v0.20.0-$(uname)-amd64.tar.gz
13+
tar -xzf terraform-docs.tar.gz
14+
chmod +x terraform-docs
15+
sudo mv terraform-docs /usr/local/bin/terraform-docs
1616
rm terraform-docs.tar.gz
1717
```
1818

infrastructure/api.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ resource "aws_api_gateway_base_path_mapping" "api_mapping" {
2323
stage_name = var.environment
2424
domain_name = local.api_gateway_full_domain_name
2525

26-
depends_on = [aws_api_gateway_deployment.ndr_api_deploy, aws_api_gateway_rest_api.ndr_doc_store_api, aws_api_gateway_stage.ndr_api]
26+
depends_on = [aws_api_gateway_deployment.ndr_api_deploy, aws_api_gateway_rest_api.ndr_doc_store_api]
2727
}
2828

2929
resource "aws_api_gateway_resource" "auth_resource" {

infrastructure/api_mtls.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ resource "aws_api_gateway_base_path_mapping" "api_mapping_mtls" {
3535

3636
depends_on = [
3737
aws_api_gateway_deployment.ndr_api_deploy_mtls,
38-
aws_api_gateway_stage.ndr_api_mtls,
3938
aws_api_gateway_rest_api.ndr_doc_store_api_mtls
4039
]
4140
}

scripts/cleanup_sandboxes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import time
12
import boto3, os, requests, sys
23

34
from botocore.exceptions import ClientError
@@ -62,3 +63,4 @@ def get_workspaces() -> list[str]:
6263
for workspace in workspaces:
6364
if workspace not in excluded:
6465
trigger_delete_workflow(token=gh_pat, sandbox=workspace)
66+
time.sleep(300)

0 commit comments

Comments
 (0)