Skip to content

Commit 1172474

Browse files
authored
new event source variable (#369)
* new event source variable * version 1.1.3 * update-status * release flow wait for main before deploying proxy
1 parent edb1506 commit 1172474

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.github/workflows/release_created.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ jobs:
4141
--targetComponent "api" \
4242
--terraformAction "apply"
4343
deploy-proxy:
44+
needs: deploy-main #wait for backend deploy to complete
4445
name: "Deploy proxy"
4546
runs-on: ubuntu-latest
4647
timeout-minutes: 10

infrastructure/terraform/components/api/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ No requirements.
3333
| <a name="input_force_lambda_code_deploy"></a> [force\_lambda\_code\_deploy](#input\_force\_lambda\_code\_deploy) | If the lambda package in s3 has the same commit id tag as the terraform build branch, the lambda will not update automatically. Set to True if making changes to Lambda code from on the same commit for example during development | `bool` | `false` | no |
3434
| <a name="input_group"></a> [group](#input\_group) | The group variables are being inherited from (often synonmous with account short-name) | `string` | n/a | yes |
3535
| <a name="input_kms_deletion_window"></a> [kms\_deletion\_window](#input\_kms\_deletion\_window) | When a kms key is deleted, how long should it wait in the pending deletion state? | `string` | `"30"` | no |
36+
| <a name="input_letter_event_source"></a> [letter\_event\_source](#input\_letter\_event\_source) | Source value to use for the letter status event updates | `string` | `"/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status"` | no |
3637
| <a name="input_letter_table_ttl_hours"></a> [letter\_table\_ttl\_hours](#input\_letter\_table\_ttl\_hours) | Number of hours to set as TTL on letters table | `number` | `24` | no |
3738
| <a name="input_letter_variant_map"></a> [letter\_variant\_map](#input\_letter\_variant\_map) | n/a | `map(object({ supplierId = string, specId = string }))` | <pre>{<br/> "lv1": {<br/> "specId": "spec1",<br/> "supplierId": "supplier1"<br/> },<br/> "lv2": {<br/> "specId": "spec2",<br/> "supplierId": "supplier1"<br/> },<br/> "lv3": {<br/> "specId": "spec3",<br/> "supplierId": "supplier2"<br/> }<br/>}</pre> | no |
3839
| <a name="input_log_level"></a> [log\_level](#input\_log\_level) | The log level to be used in lambda functions within the component. Any log with a lower severity than the configured value will not be logged: https://docs.python.org/3/library/logging.html#levels | `string` | `"INFO"` | no |

infrastructure/terraform/components/api/module_lambda_letter_updates_transformer.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module "letter_updates_transformer" {
3636

3737
lambda_env_vars = merge(local.common_lambda_env_vars, {
3838
EVENTPUB_SNS_TOPIC_ARN = "${module.eventpub.sns_topic.arn}",
39-
EVENT_SOURCE = "/data-plane/supplier-api/${var.group}/${var.environment}/letters"
39+
EVENT_SOURCE = var.letter_event_source
4040
})
4141
}
4242

infrastructure/terraform/components/api/variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@ variable "sns_success_logging_sample_percent" {
188188
default = 0
189189
}
190190

191+
variable "letter_event_source" {
192+
type = string
193+
description = "Source value to use for the letter status event updates"
194+
default = "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status"
195+
}
196+
191197
variable "enable_api_data_trace" {
192198
type = bool
193199
description = "Enable API Gateway data trace logging"

0 commit comments

Comments
 (0)