Skip to content

Commit 463d82f

Browse files
authored
change the s3 source to reference release (#357)
* change the s3 source to reference release * variable plumbing
1 parent f0d8593 commit 463d82f

File tree

6 files changed

+31
-7
lines changed

6 files changed

+31
-7
lines changed

infrastructure/terraform/components/api/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ No requirements.
1717
| <a name="input_core_environment"></a> [core\_environment](#input\_core\_environment) | Environment of Core | `string` | `"prod"` | no |
1818
| <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 |
1919
| <a name="input_disable_gateway_execute_endpoint"></a> [disable\_gateway\_execute\_endpoint](#input\_disable\_gateway\_execute\_endpoint) | Disable the execution endpoint for the API Gateway | `bool` | `true` | no |
20+
| <a name="input_enable_event_cache"></a> [enable\_event\_cache](#input\_enable\_event\_cache) | Enable caching of events to an S3 bucket | `bool` | `false` | no |
21+
| <a name="input_enable_sns_delivery_logging"></a> [enable\_sns\_delivery\_logging](#input\_enable\_sns\_delivery\_logging) | Enable SNS Delivery Failure Notifications | `bool` | `false` | no |
2022
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the tfscaffold environment | `string` | n/a | yes |
2123
| <a name="input_eventpub_control_plane_bus_arn"></a> [eventpub\_control\_plane\_bus\_arn](#input\_eventpub\_control\_plane\_bus\_arn) | ARN of the EventBridge control plane bus for eventpub | `string` | `""` | no |
2224
| <a name="input_eventpub_data_plane_bus_arn"></a> [eventpub\_data\_plane\_bus\_arn](#input\_eventpub\_data\_plane\_bus\_arn) | ARN of the EventBridge data plane bus for eventpub | `string` | `""` | no |
@@ -34,6 +36,7 @@ No requirements.
3436
| <a name="input_project"></a> [project](#input\_project) | The name of the tfscaffold project | `string` | n/a | yes |
3537
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
3638
| <a name="input_shared_infra_account_id"></a> [shared\_infra\_account\_id](#input\_shared\_infra\_account\_id) | The AWS Account ID of the shared infrastructure account | `string` | `"000000000000"` | no |
39+
| <a name="input_sns_success_logging_sample_percent"></a> [sns\_success\_logging\_sample\_percent](#input\_sns\_success\_logging\_sample\_percent) | Enable SNS Delivery Successful Sample Percentage | `number` | `0` | no |
3740
## Modules
3841

3942
| Name | Source | Version |

infrastructure/terraform/components/api/modules_eventpub.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ module "eventpub" {
1919
force_destroy = var.force_destroy
2020

2121
event_cache_buffer_interval = 500
22-
enable_sns_delivery_logging = true
23-
sns_success_logging_sample_percent = 0
22+
enable_sns_delivery_logging = var.enable_sns_delivery_logging
23+
sns_success_logging_sample_percent = var.sns_success_logging_sample_percent
2424

2525
event_cache_expiry_days = 30
26-
enable_event_cache = true
26+
enable_event_cache = var.enable_event_cache
2727

2828
data_plane_bus_arn = var.eventpub_data_plane_bus_arn
2929
control_plane_bus_arn = var.eventpub_control_plane_bus_arn

infrastructure/terraform/components/api/modules_eventsub.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ module "eventsub" {
1818
force_destroy = var.force_destroy
1919

2020
event_cache_buffer_interval = 500
21-
enable_sns_delivery_logging = true
22-
sns_success_logging_sample_percent = 0
21+
enable_sns_delivery_logging = var.enable_sns_delivery_logging
22+
sns_success_logging_sample_percent = var.sns_success_logging_sample_percent
2323

2424
event_cache_expiry_days = 30
25+
enable_event_cache = var.enable_event_cache
26+
2527
shared_infra_account_id = var.shared_infra_account_id
2628
}

infrastructure/terraform/components/api/variables.tf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,22 @@ variable "core_environment" {
162162
default = "prod"
163163

164164
}
165+
166+
# Event Pub/Sub cache settings
167+
variable "enable_event_cache" {
168+
type = bool
169+
description = "Enable caching of events to an S3 bucket"
170+
default = false
171+
}
172+
173+
variable "enable_sns_delivery_logging" {
174+
type = bool
175+
description = "Enable SNS Delivery Failure Notifications"
176+
default = false
177+
}
178+
179+
variable "sns_success_logging_sample_percent" {
180+
type = number
181+
description = "Enable SNS Delivery Successful Sample Percentage"
182+
default = 0
183+
}

infrastructure/terraform/modules/eventsub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
| Name | Source | Version |
3636
|------|--------|---------|
37-
| <a name="module_s3bucket_event_cache"></a> [s3bucket\_event\_cache](#module\_s3bucket\_event\_cache) | git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket | v1.0.8 |
37+
| <a name="module_s3bucket_event_cache"></a> [s3bucket\_event\_cache](#module\_s3bucket\_event\_cache) | https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-s3bucket.zip | n/a |
3838
## Outputs
3939

4040
| Name | Description |

infrastructure/terraform/modules/eventsub/module_s3bucket_event_cache.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module "s3bucket_event_cache" {
2-
source = "git::https://github.com/NHSDigital/nhs-notify-shared-modules.git//infrastructure/modules/s3bucket?ref=v1.0.8"
2+
source = "https://github.com/NHSDigital/nhs-notify-shared-modules/releases/download/v2.0.26/terraform-s3bucket.zip"
33

44
count = var.enable_event_cache ? 1 : 0
55

0 commit comments

Comments
 (0)