diff --git a/.github/workflows/release_created.yaml b/.github/workflows/release_created.yaml index 9baf4340..6abc3f8c 100644 --- a/.github/workflows/release_created.yaml +++ b/.github/workflows/release_created.yaml @@ -41,6 +41,7 @@ jobs: --targetComponent "api" \ --terraformAction "apply" deploy-proxy: + needs: deploy-main #wait for backend deploy to complete name: "Deploy proxy" runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/infrastructure/terraform/components/api/README.md b/infrastructure/terraform/components/api/README.md index f1f278c5..f85a3e5e 100644 --- a/infrastructure/terraform/components/api/README.md +++ b/infrastructure/terraform/components/api/README.md @@ -33,6 +33,7 @@ No requirements. | [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 | | [group](#input\_group) | The group variables are being inherited from (often synonmous with account short-name) | `string` | n/a | yes | | [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 | +| [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 | | [letter\_table\_ttl\_hours](#input\_letter\_table\_ttl\_hours) | Number of hours to set as TTL on letters table | `number` | `24` | no | | [letter\_variant\_map](#input\_letter\_variant\_map) | n/a | `map(object({ supplierId = string, specId = string }))` |
{
"lv1": {
"specId": "spec1",
"supplierId": "supplier1"
},
"lv2": {
"specId": "spec2",
"supplierId": "supplier1"
},
"lv3": {
"specId": "spec3",
"supplierId": "supplier2"
}
}
| no | | [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 | diff --git a/infrastructure/terraform/components/api/module_lambda_letter_updates_transformer.tf b/infrastructure/terraform/components/api/module_lambda_letter_updates_transformer.tf index 0f263b28..7f19e4e0 100644 --- a/infrastructure/terraform/components/api/module_lambda_letter_updates_transformer.tf +++ b/infrastructure/terraform/components/api/module_lambda_letter_updates_transformer.tf @@ -36,7 +36,7 @@ module "letter_updates_transformer" { lambda_env_vars = merge(local.common_lambda_env_vars, { EVENTPUB_SNS_TOPIC_ARN = "${module.eventpub.sns_topic.arn}", - EVENT_SOURCE = "/data-plane/supplier-api/${var.group}/${var.environment}/letters" + EVENT_SOURCE = var.letter_event_source }) } diff --git a/infrastructure/terraform/components/api/variables.tf b/infrastructure/terraform/components/api/variables.tf index 97169278..1a0cc0ef 100644 --- a/infrastructure/terraform/components/api/variables.tf +++ b/infrastructure/terraform/components/api/variables.tf @@ -188,6 +188,12 @@ variable "sns_success_logging_sample_percent" { default = 0 } +variable "letter_event_source" { + type = string + description = "Source value to use for the letter status event updates" + default = "/data-plane/supplier-api/nhs-supplier-api-prod/main/update-status" +} + variable "enable_api_data_trace" { type = bool description = "Enable API Gateway data trace logging"