Skip to content
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/amp_branch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_amplify_app_id"></a> [amplify\_app\_id](#input\_amplify\_app\_id) | Amplify application ID | `string` | n/a | yes |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_branch"></a> [branch](#input\_branch) | The name of the branch being deployed | `string` | n/a | yes |
Expand All @@ -34,7 +34,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_name"></a> [name](#output\_name) | Name of the Amplify branch |

<!-- vale on -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_acct_s3_buckets"></a> [acct\_s3\_buckets](#input\_acct\_s3\_buckets) | Account S3 buckets | `map(any)` | n/a | yes |
| <a name="input_apim_auth_token_schedule"></a> [apim\_auth\_token\_schedule](#input\_apim\_auth\_token\_schedule) | Schedule to renew the APIM auth token | `string` | `"rate(9 minutes)"` | no |
| <a name="input_apim_auth_token_url"></a> [apim\_auth\_token\_url](#input\_apim\_auth\_token\_url) | URL to generate an APIM auth token | `string` | n/a | yes |
Expand Down Expand Up @@ -41,7 +41,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_apim_access_token_ssm_parameter"></a> [apim\_access\_token\_ssm\_parameter](#output\_apim\_access\_token\_ssm\_parameter) | APIM Access Token SSM parameter details |

<!-- vale on -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ No requirements.
## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_backup_copy_vault_account_id"></a> [backup\_copy\_vault\_account\_id](#input\_backup\_copy\_vault\_account\_id) | The account id of the destination backup vault for allowing restores back into the source account. | `string` | `""` | no |
| <a name="input_backup_copy_vault_arn"></a> [backup\_copy\_vault\_arn](#input\_backup\_copy\_vault\_arn) | The ARN of the destination backup vault for cross-account backup copies. | `string` | `""` | no |
| <a name="input_backup_plan_config_dynamodb"></a> [backup\_plan\_config\_dynamodb](#input\_backup\_plan\_config\_dynamodb) | Configuration for backup plans with dynamodb | <pre>object({<br/> enable = bool<br/> selection_tag = string<br/> compliance_resource_types = list(string)<br/> rules = optional(list(object({<br/> name = string<br/> schedule = string<br/> enable_continuous_backup = optional(bool)<br/> lifecycle = object({<br/> delete_after = number<br/> cold_storage_after = optional(number)<br/> })<br/> copy_action = optional(object({<br/> delete_after = optional(number)<br/> }))<br/> })))<br/> })</pre> | <pre>{<br/> "compliance_resource_types": [<br/> "DynamoDB"<br/> ],<br/> "enable": false,<br/> "rules": [<br/> {<br/> "copy_action": {<br/> "delete_after": 365<br/> },<br/> "lifecycle": {<br/> "delete_after": 35<br/> },<br/> "name": "dynamodb_daily_kept_5_weeks",<br/> "schedule": "cron(0 0 * * ? *)"<br/> },<br/> {<br/> "copy_action": {<br/> "delete_after": 365<br/> },<br/> "lifecycle": {<br/> "delete_after": 90<br/> },<br/> "name": "dynamodb_weekly_kept_3_months",<br/> "schedule": "cron(0 1 ? * SUN *)"<br/> },<br/> {<br/> "copy_action": {<br/> "delete_after": 365<br/> },<br/> "lifecycle": {<br/> "cold_storage_after": 30,<br/> "delete_after": 2555<br/> },<br/> "name": "dynamodb_monthly_kept_7_years",<br/> "schedule": "cron(0 2 1 * ? *)"<br/> }<br/> ],<br/> "selection_tag": "BackupDynamoDB"<br/>}</pre> | no |
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/eventpub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_access_logging_bucket"></a> [access\_logging\_bucket](#input\_access\_logging\_bucket) | S3 Access logging bucket name. | `string` | `""` | no |
| <a name="input_additional_policies_for_event_cache_bucket"></a> [additional\_policies\_for\_event\_cache\_bucket](#input\_additional\_policies\_for\_event\_cache\_bucket) | A list of JSON policies to use to build the bucket policy | `list(string)` | `[]` | no |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
Expand Down Expand Up @@ -45,7 +45,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_publishing_anomaly_alarm"></a> [publishing\_anomaly\_alarm](#output\_publishing\_anomaly\_alarm) | CloudWatch anomaly detection alarm details for SNS publishing |
| <a name="output_s3_bucket_event_cache"></a> [s3\_bucket\_event\_cache](#output\_s3\_bucket\_event\_cache) | S3 Bucket ARN and Name for event cache |
| <a name="output_sns_topic"></a> [sns\_topic](#output\_sns\_topic) | SNS Topic ARN and Name |
Expand Down
8 changes: 4 additions & 4 deletions infrastructure/terraform/modules/eventsub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_access_logging_bucket"></a> [access\_logging\_bucket](#input\_access\_logging\_bucket) | Name of S3 bucket to use for access logging | `string` | `""` | no |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_component"></a> [component](#input\_component) | The name of the terraformscaffold component calling this module | `string` | n/a | yes |
Expand All @@ -27,6 +27,7 @@
| <a name="input_event_anomaly_period"></a> [event\_anomaly\_period](#input\_event\_anomaly\_period) | The period in seconds over which the specified statistic is applied for anomaly detection. Minimum 300 seconds (5 minutes). Recommended: 300-600. | `number` | `300` | no |
| <a name="input_event_cache_buffer_interval"></a> [event\_cache\_buffer\_interval](#input\_event\_cache\_buffer\_interval) | The buffer interval for data firehose | `number` | `500` | no |
| <a name="input_event_cache_expiry_days"></a> [event\_cache\_expiry\_days](#input\_event\_cache\_expiry\_days) | s3 archiving expiry in days | `number` | `30` | no |
| <a name="input_eventsub_shared_account_ids"></a> [eventsub\_shared\_account\_ids](#input\_eventsub\_shared\_account\_ids) | List of shared infra account IDs allowed to publish to the SNS topic. | `list(string)` | `[]` | no |
| <a name="input_force_destroy"></a> [force\_destroy](#input\_force\_destroy) | When enabled will force destroy event-cache S3 bucket | `bool` | `false` | no |
| <a name="input_glue_role_arn"></a> [glue\_role\_arn](#input\_glue\_role\_arn) | ARN of the Glue execution role from the parent | `string` | n/a | yes |
| <a name="input_group"></a> [group](#input\_group) | The name of the tfscaffold group | `string` | `null` | no |
Expand All @@ -36,13 +37,12 @@
| <a name="input_name"></a> [name](#input\_name) | A unique name to distinguish this module invocation from others within the same CSI scope | `string` | n/a | yes |
| <a name="input_project"></a> [project](#input\_project) | The name of the terraformscaffold project calling the module | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The AWS Region | `string` | n/a | yes |
| <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 |
| <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 |

## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_s3_bucket_event_cache"></a> [s3\_bucket\_event\_cache](#output\_s3\_bucket\_event\_cache) | S3 Bucket ARN and Name for event cache |
| <a name="output_sns_topic"></a> [sns\_topic](#output\_sns\_topic) | SNS Topic ARN and Name |

Expand Down
30 changes: 16 additions & 14 deletions infrastructure/terraform/modules/eventsub/sns_topic_policy.tf
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,24 @@ data "aws_iam_policy_document" "sns_topic_policy" {
}
}

statement {
sid = "AllowAllSNSActionsFromSharedAccount"
effect = "Allow"
actions = [
"SNS:Publish",
]
dynamic "statement" {
for_each = length(var.eventsub_shared_account_ids) > 0 ? [1] : []

principals {
type = "AWS"
identifiers = [
"arn:aws:iam::${var.shared_infra_account_id}:root"
content {
sid = "AllowAllSNSActionsFromSharedAccount"
effect = "Allow"
actions = [
"SNS:Publish",
]
}

resources = [
aws_sns_topic.main.arn,
]
principals {
type = "AWS"
identifiers = [for account_id in var.eventsub_shared_account_ids : "arn:aws:iam::${account_id}:root"]
}

resources = [
aws_sns_topic.main.arn,
]
}
}
}
12 changes: 6 additions & 6 deletions infrastructure/terraform/modules/eventsub/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ variable "sns_success_logging_sample_percent" {
default = 0
}

variable "eventsub_shared_account_ids" {
type = list(string)
description = "List of shared infra account IDs allowed to publish to the SNS topic."
default = []
}

##
# CloudWatch Anomaly Detection Variables
##
Expand Down Expand Up @@ -142,12 +148,6 @@ variable "force_destroy" {
default = false
}

variable "shared_infra_account_id" {
type = string
description = "The AWS Account ID of the shared infrastructure account"
default = "000000000000"
}

variable "glue_role_arn" {
type = string
description = "ARN of the Glue execution role from the parent"
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/kms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_alias"></a> [alias](#input\_alias) | Alias name for the hieradata KMS key | `string` | n/a | yes |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_component"></a> [component](#input\_component) | The name of the terraformscaffold component calling this module | `string` | n/a | yes |
Expand All @@ -29,7 +29,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_admin_policy_arn"></a> [admin\_policy\_arn](#output\_admin\_policy\_arn) | ARN of the admin IAM policy |
| <a name="output_key_arn"></a> [key\_arn](#output\_key\_arn) | ARN of the KMS key |
| <a name="output_key_id"></a> [key\_id](#output\_key\_id) | ID of the KMS key |
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/lambda/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ output "processor_lambda_error_rate_alarm_arn" {
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.12 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_application_log_level"></a> [application\_log\_level](#input\_application\_log\_level) | The detail level of the logs the application sends to CloudWatch | `string` | `"INFO"` | no |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_component"></a> [component](#input\_component) | The name of the tfscaffold component | `string` | n/a | yes |
Expand Down Expand Up @@ -89,7 +89,7 @@ output "processor_lambda_error_rate_alarm_arn" {
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_cloudwatch_log_group_name"></a> [cloudwatch\_log\_group\_name](#output\_cloudwatch\_log\_group\_name) | Name of the CloudWatch Log Group for the Lambda function |
| <a name="output_function_arn"></a> [function\_arn](#output\_function\_arn) | ARN of the Lambda function |
| <a name="output_function_env_vars"></a> [function\_env\_vars](#output\_function\_env\_vars) | Environment variables for the Lambda function |
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/obs-datasource/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_component"></a> [component](#input\_component) | The name of the terraformscaffold component calling this module | `string` | n/a | yes |
| <a name="input_default_tags"></a> [default\_tags](#input\_default\_tags) | Default tag map for application to all taggable resources in the module | `map(string)` | `{}` | no |
Expand All @@ -29,7 +29,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_log_subscription_role_arn"></a> [log\_subscription\_role\_arn](#output\_log\_subscription\_role\_arn) | The ARN of the log subscription IAM role. |

<!-- vale on -->
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/s3bucket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_acl"></a> [acl](#input\_acl) | ACL to set on the bucket. Defaults to private | `string` | `"private"` | no |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_bucket_key_enabled"></a> [bucket\_key\_enabled](#input\_bucket\_key\_enabled) | Boolean to toggle bucket key enablement | `bool` | `true` | no |
Expand All @@ -37,7 +37,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_acl"></a> [acl](#output\_acl) | The ACL of the S3 bucket. If the object ownership is set to 'BucketOwnerEnforced', the ACL will be 'private'. Otherwise, it will reflect the ACL set in the aws\_s3\_bucket\_acl resource. |
| <a name="output_arn"></a> [arn](#output\_arn) | The ARN of the S3 bucket |
| <a name="output_bucket"></a> [bucket](#output\_bucket) | The name of the S3 bucket |
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.9.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_allowed_arns"></a> [allowed\_arns](#input\_allowed\_arns) | A list of AWS account IDs allowed to access this resource | `list(any)` | `null` | no |
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_component"></a> [component](#input\_component) | The name of the tfscaffold component | `string` | n/a | yes |
Expand Down Expand Up @@ -42,7 +42,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_sqs_dlq_arn"></a> [sqs\_dlq\_arn](#output\_sqs\_dlq\_arn) | The ARN of the SQS dead-letter queue |
| <a name="output_sqs_dlq_messages_alarm_arn"></a> [sqs\_dlq\_messages\_alarm\_arn](#output\_sqs\_dlq\_messages\_alarm\_arn) | The ARN of the CloudWatch alarm for messages in the SQS dead-letter queue |
| <a name="output_sqs_dlq_messages_alarm_name"></a> [sqs\_dlq\_messages\_alarm\_name](#output\_sqs\_dlq\_messages\_alarm\_name) | The name of the CloudWatch alarm for messages in the SQS dead-letter queue |
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/terraform/modules/ssl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
## Requirements

| Name | Version |
| ---- | ------- |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.10.1 |
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | 4.1.0 |

## Inputs

| Name | Description | Type | Default | Required |
| ---- | ----------- | ---- | ------- | :------: |
|------|-------------|------|---------|:--------:|
| <a name="input_aws_account_id"></a> [aws\_account\_id](#input\_aws\_account\_id) | The AWS Account ID (numeric) | `string` | n/a | yes |
| <a name="input_component"></a> [component](#input\_component) | The name of the tfscaffold component | `string` | n/a | yes |
| <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 |
Expand All @@ -31,7 +31,7 @@
## Outputs

| Name | Description |
| ---- | ----------- |
|------|-------------|
| <a name="output_cacert_pem"></a> [cacert\_pem](#output\_cacert\_pem) | Truststore |
| <a name="output_server_crt"></a> [server\_crt](#output\_server\_crt) | Server Certificate |
| <a name="output_server_key"></a> [server\_key](#output\_server\_key) | Server Key |
Expand Down
Loading