Skip to content

Commit 15a9af0

Browse files
authored
CCM-14325: Use PDM mock in dev environments (#232)
1 parent cf0a98d commit 15a9af0

39 files changed

Lines changed: 117 additions & 287 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
PyJWT==2.8.0
1+
PyJWT==2.12.0
22
requests==2.32.4

docs/package-lock.json

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

infrastructure/terraform/components/dl/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ No requirements.
1818
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
1919
| <a name="input_aws_account_type"></a> [aws\_account\_type](#input\_aws\_account\_type) | The AWS Account Type | `string` | n/a | yes |
2020
| <a name="input_component"></a> [component](#input\_component) | The variable encapsulating the name of this component | `string` | `"dl"` | no |
21+
| <a name="input_core_notify_include_auth_header"></a> [core\_notify\_include\_auth\_header](#input\_core\_notify\_include\_auth\_header) | Whether to send auth tokens with core notify API calls. | `bool` | `true` | no |
2122
| <a name="input_core_notify_url"></a> [core\_notify\_url](#input\_core\_notify\_url) | The URL used to send requests to Notify | `string` | `"https://sandbox.api.service.nhs.uk"` | no |
2223
| <a name="input_default_cloudwatch_event_bus_name"></a> [default\_cloudwatch\_event\_bus\_name](#input\_default\_cloudwatch\_event\_bus\_name) | The name of the default cloudwatch event bus. This is needed as GuardDuty Scan Result events are sent to the default bus | `string` | `"default"` | no |
2324
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | A map of default tags to apply to all taggable resources within the component | `map(string)` | `{}` | no |
2425
| <a name="input_enable_dynamodb_delete_protection"></a> [enable\_dynamodb\_delete\_protection](#input\_enable\_dynamodb\_delete\_protection) | Enable DynamoDB Delete Protection on all Tables | `bool` | `true` | no |
2526
| <a name="input_enable_event_anomaly_detection"></a> [enable\_event\_anomaly\_detection](#input\_enable\_event\_anomaly\_detection) | Enable CloudWatch anomaly detection alarm for core notifier queue message reception | `bool` | `true` | no |
2627
| <a name="input_enable_event_cache"></a> [enable\_event\_cache](#input\_enable\_event\_cache) | Enable caching of events to an S3 bucket | `bool` | `true` | no |
2728
| <a name="input_enable_mock_mesh"></a> [enable\_mock\_mesh](#input\_enable\_mock\_mesh) | Enable mock mesh access (dev only). Grants lambda permission to read mock-mesh prefix in non-pii bucket. | `bool` | `false` | no |
28-
| <a name="input_enable_pdm_mock"></a> [enable\_pdm\_mock](#input\_enable\_pdm\_mock) | Flag indicating whether to deploy PDM mock API (should be false in production environments) | `bool` | `true` | no |
29+
| <a name="input_enable_pdm_mock"></a> [enable\_pdm\_mock](#input\_enable\_pdm\_mock) | Flag indicating whether to deploy PDM mock API (should be false in production environments) | `bool` | `false` | no |
2930
| <a name="input_enable_sns_delivery_logging"></a> [enable\_sns\_delivery\_logging](#input\_enable\_sns\_delivery\_logging) | Enable SNS Delivery Failure Notifications | `bool` | `true` | no |
3031
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
3132
| <a name="input_event_anomaly_band_width"></a> [event\_anomaly\_band\_width](#input\_event\_anomaly\_band\_width) | The width of the anomaly detection band. Higher values (e.g. 4-6) reduce sensitivity and noise, lower values (e.g. 2-3) increase sensitivity. Recommended: 2-4. | `number` | `3` | no |
@@ -42,8 +43,6 @@ No requirements.
4243
| <a name="input_mesh_poll_schedule"></a> [mesh\_poll\_schedule](#input\_mesh\_poll\_schedule) | Schedule to poll MESH for messages | `string` | `"rate(5 minutes)"` | no |
4344
| <a name="input_metadata_refresh_schedule"></a> [metadata\_refresh\_schedule](#input\_metadata\_refresh\_schedule) | Schedule for refreshing reporting metadata. | `string` | `"cron(10 6-22 * * ? *)"` | no |
4445
| <a name="input_parent_acct_environment"></a> [parent\_acct\_environment](#input\_parent\_acct\_environment) | Name of the environment responsible for the acct resources used, affects things like DNS zone. Useful for named dev environments | `string` | `"main"` | no |
45-
| <a name="input_pdm_mock_access_token"></a> [pdm\_mock\_access\_token](#input\_pdm\_mock\_access\_token) | Mock access token for PDM API authentication (used in local/dev environments) | `string` | `"mock-pdm-token"` | no |
46-
| <a name="input_pdm_use_non_mock_token"></a> [pdm\_use\_non\_mock\_token](#input\_pdm\_use\_non\_mock\_token) | Whether to use the shared APIM access token from SSM (/component/environment/apim/access\_token) instead of the mock token | `bool` | `false` | no |
4746
| <a name="input_pii_data_retention_non_current_days"></a> [pii\_data\_retention\_non\_current\_days](#input\_pii\_data\_retention\_non\_current\_days) | The number of non current days for data retention policy for PII | `number` | `14` | no |
4847
| <a name="input_pii_data_retention_policy_days"></a> [pii\_data\_retention\_policy\_days](#input\_pii\_data\_retention\_policy\_days) | The number of days for data retention policy for PII | `number` | `534` | no |
4948
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |

infrastructure/terraform/components/dl/aws_api_gateway_deployment_pdm_mock.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_api_gateway_deployment" "pdm_mock" {
2-
count = local.deploy_pdm_mock ? 1 : 0
2+
count = var.enable_pdm_mock ? 1 : 0
33

44
depends_on = [
55
aws_api_gateway_integration.create_document_reference,

infrastructure/terraform/components/dl/aws_api_gateway_integration_create_document_reference.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_api_gateway_integration" "create_document_reference" {
2-
count = local.deploy_pdm_mock ? 1 : 0
2+
count = var.enable_pdm_mock ? 1 : 0
33

44
rest_api_id = aws_api_gateway_rest_api.pdm_mock[0].id
55
resource_id = aws_api_gateway_resource.document_reference[0].id

infrastructure/terraform/components/dl/aws_api_gateway_integration_get_document_reference.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_api_gateway_integration" "get_document_reference" {
2-
count = local.deploy_pdm_mock ? 1 : 0
2+
count = var.enable_pdm_mock ? 1 : 0
33

44
rest_api_id = aws_api_gateway_rest_api.pdm_mock[0].id
55
resource_id = aws_api_gateway_resource.document_reference_id[0].id

infrastructure/terraform/components/dl/aws_api_gateway_method_create_document_reference.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_api_gateway_method" "create_document_reference" {
2-
count = local.deploy_pdm_mock ? 1 : 0
2+
count = var.enable_pdm_mock ? 1 : 0
33

44
rest_api_id = aws_api_gateway_rest_api.pdm_mock[0].id
55
resource_id = aws_api_gateway_resource.document_reference[0].id

infrastructure/terraform/components/dl/aws_api_gateway_method_get_document_reference.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_api_gateway_method" "get_document_reference" {
2-
count = local.deploy_pdm_mock ? 1 : 0
2+
count = var.enable_pdm_mock ? 1 : 0
33

44
rest_api_id = aws_api_gateway_rest_api.pdm_mock[0].id
55
resource_id = aws_api_gateway_resource.document_reference_id[0].id

infrastructure/terraform/components/dl/aws_api_gateway_resource_document_reference.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_api_gateway_resource" "document_reference" {
2-
count = local.deploy_pdm_mock ? 1 : 0
2+
count = var.enable_pdm_mock ? 1 : 0
33

44
rest_api_id = aws_api_gateway_rest_api.pdm_mock[0].id
55
parent_id = aws_api_gateway_resource.r4[0].id

infrastructure/terraform/components/dl/aws_api_gateway_resource_document_reference_id.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_api_gateway_resource" "document_reference_id" {
2-
count = local.deploy_pdm_mock ? 1 : 0
2+
count = var.enable_pdm_mock ? 1 : 0
33

44
rest_api_id = aws_api_gateway_rest_api.pdm_mock[0].id
55
parent_id = aws_api_gateway_resource.document_reference[0].id

0 commit comments

Comments
 (0)