Skip to content

Commit 4b86bea

Browse files
committed
SP-920 - Enable Caching
* Update opg-sirius-service version to fix the caching issue. #patch * Enable caching on the Lambda. #minor * Allow Sirius Dev Operator to execute the API in Dev. #minor * Fix syntax issue with destroy ephemeral environments. #patch * Fix workspace protection for ephemeral environments. #patch
1 parent 5fdadf9 commit 4b86bea

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.github/workflows/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -198,4 +198,6 @@ jobs:
198198
run: |
199199
terraform apply --auto-approve
200200
- name: Protect Workspace
201+
env:
202+
TF_WORKSPACE: ${{ steps.extract_branch.outputs.branch }}
201203
run: terraform-workspace-manager -register-workspace=$TF_WORKSPACE -time-to-protect=1 -aws-account-id=288342028542 -aws-iam-role=integrations-ci

.github/workflows/destroy_workspaces.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ on:
66

77

88
defaults:
9-
working-directory: ./terraform/Environment
109
run:
1110
shell: bash
11+
working-directory: ./terraform/environment
1212

1313
jobs:
1414
destroy_workspace:
1515
name: Destroy
1616
runs-on: "ubuntu-latest"
17-
needs: terraform_checks
1817
steps:
1918
- uses: actions/checkout@v2
2019
- uses: hashicorp/setup-terraform@v1

lambda_functions/v1/requirements/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Werkzeug==1.0.1
44
redis==3.5.3
55
localstack-client==1.10
66
requests==2.25.1
7-
opg-sirius-service==0.1.0
7+
opg-sirius-service==0.1.1

terraform/environment/modules/lambda/lambda.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ resource "aws_lambda_function" "lambda_function" {
3232
LOGGER_LEVEL = var.account.logger_level
3333
API_VERSION = var.openapi_version
3434
SESSION_DATA = var.account.session_data
35-
REQUEST_CACHING = "disabled"
35+
REQUEST_CACHING = "enabled"
3636
REDIS_URL = var.redis_url
3737
}
3838
}

terraform/environment/terraform.tfvars.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"account_id": "288342028542",
55
"account_mapping": "development",
66
"allowed_roles": [
7+
"\"arn:aws:iam::288342028542:role/operator\"",
78
"\"arn:aws:iam::001780581745:root\"",
89
"\"arn:aws:iam::050256574573:root\"",
910
"\"arn:aws:iam::367815980639:root\"",

0 commit comments

Comments
 (0)