Skip to content

Commit 983b05c

Browse files
authored
Merge pull request #78 from NHSDigital/feature/CCM-9689_desc
CCM-9689: Fix terraform variable and output descriptions
2 parents 85af54e + 4916734 commit 983b05c

24 files changed

Lines changed: 110 additions & 80 deletions

infrastructure/modules/amp_branch/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ No modules.
3535

3636
| Name | Description |
3737
|------|-------------|
38-
| <a name="output_name"></a> [name](#output\_name) | n/a |
38+
| <a name="output_name"></a> [name](#output\_name) | Name of the Amplify branch |
3939
<!-- vale on -->
4040
<!-- markdownlint-enable -->
4141
<!-- END_TF_DOCS -->
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
output "name" {
2-
value = aws_amplify_branch.main.branch_name
2+
description = "Name of the Amplify branch"
3+
value = aws_amplify_branch.main.branch_name
34
}

infrastructure/modules/amp_branch/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ variable "branch" {
6868
variable "display_name" {
6969
description = "The display name of the branch app being deployed"
7070
type = string
71-
default = null
71+
default = null
7272
}
7373

7474
variable "enable_auto_build" {

infrastructure/modules/aws-backup-source/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ No requirements.
5757
| <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 |
5858
| <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 |
5959
| <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 |
60-
| <a name="input_backup_plan_config_s3"></a> [backup\_plan\_config\_s3](#input\_backup\_plan\_config\_s3) | Configuration for backup plans | <pre>object({<br/> enable = bool<br/> selection_tag = string<br/> compliance_resource_types = list(string)<br/> rules = list(object({<br/> name = string<br/> schedule = string<br/> enable_continuous_backup = optional(bool)<br/> lifecycle = object({<br/> delete_after = optional(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/> "S3"<br/> ],<br/> "enable": false,<br/> "rules": [<br/> {<br/> "copy_action": {<br/> "delete_after": 365<br/> },<br/> "lifecycle": {<br/> "delete_after": 35<br/> },<br/> "name": "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": "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": "monthly_kept_7_years",<br/> "schedule": "cron(0 2 1 * ? *)"<br/> },<br/> {<br/> "copy_action": {<br/> "delete_after": 365<br/> },<br/> "enable_continuous_backup": true,<br/> "lifecycle": {<br/> "delete_after": 35<br/> },<br/> "name": "point_in_time_recovery",<br/> "schedule": "cron(0 5 * * ? *)"<br/> }<br/> ],<br/> "selection_tag": "BackupLocal"<br/>}</pre> | no |
60+
| <a name="input_backup_plan_config_s3"></a> [backup\_plan\_config\_s3](#input\_backup\_plan\_config\_s3) | Configuration for backup plans for s3 | <pre>object({<br/> enable = bool<br/> selection_tag = string<br/> compliance_resource_types = list(string)<br/> rules = list(object({<br/> name = string<br/> schedule = string<br/> enable_continuous_backup = optional(bool)<br/> lifecycle = object({<br/> delete_after = optional(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/> "S3"<br/> ],<br/> "enable": false,<br/> "rules": [<br/> {<br/> "copy_action": {<br/> "delete_after": 365<br/> },<br/> "lifecycle": {<br/> "delete_after": 35<br/> },<br/> "name": "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": "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": "monthly_kept_7_years",<br/> "schedule": "cron(0 2 1 * ? *)"<br/> },<br/> {<br/> "copy_action": {<br/> "delete_after": 365<br/> },<br/> "enable_continuous_backup": true,<br/> "lifecycle": {<br/> "delete_after": 35<br/> },<br/> "name": "point_in_time_recovery",<br/> "schedule": "cron(0 5 * * ? *)"<br/> }<br/> ],<br/> "selection_tag": "BackupLocal"<br/>}</pre> | no |
6161
| <a name="input_component"></a> [component](#input\_component) | The name of the tfscaffold component | `string` | n/a | yes |
6262
| <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 |
6363
| <a name="input_environment"></a> [environment](#input\_environment) | The name of the environment where AWS Backup is configured. | `string` | n/a | yes |

infrastructure/modules/aws-backup-source/backup_plan_dynamodb.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
resource "aws_backup_plan" "dynamodb" {
33
count = var.backup_plan_config_dynamodb.enable ? 1 : 0
44

5-
name = "${local.csi}-dynamodb"
5+
name = "${local.csi}-dynamodb"
66

77
dynamic "rule" {
88
for_each = var.backup_plan_config_dynamodb.rules

infrastructure/modules/aws-backup-source/backup_report_plan_copy_jobs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_backup_report_plan" "copy_jobs" {
2-
count = var.backup_copy_vault_arn != "" && var.backup_copy_vault_account_id != "" ? 1 : 0
2+
count = var.backup_copy_vault_arn != "" && var.backup_copy_vault_account_id != "" ? 1 : 0
33

44
name = "${local.csi_underscore}_copy_jobs"
55
description = "Report for showing whether copies ran successfully in the last 24 hours"

infrastructure/modules/aws-backup-source/backup_report_plan_resource_compliance.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ resource "aws_backup_report_plan" "resource_compliance" {
33
description = "Report for showing whether resources are compliant with the framework"
44

55
report_delivery_channel {
6-
formats = ["JSON"]
6+
formats = ["JSON"]
77
s3_bucket_name = var.reports_bucket
88
s3_key_prefix = "resource_compliance"
99
}
@@ -19,6 +19,6 @@ resource "aws_backup_report_plan" "resource_compliance" {
1919
var.backup_plan_config_s3.enable ? [aws_backup_framework.s3[0].arn] : []
2020
))
2121

22-
report_template = "RESOURCE_COMPLIANCE_REPORT"
22+
report_template = "RESOURCE_COMPLIANCE_REPORT"
2323
}
2424
}

infrastructure/modules/aws-backup-source/iam_role_backup.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
resource "aws_iam_role" "backup" {
2-
name = "${local.csi}"
2+
name = local.csi
33
assume_role_policy = data.aws_iam_policy_document.assume_role.json
44
}
55

infrastructure/modules/aws-backup-source/locals.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ locals {
99
var.name
1010
)
1111

12-
csi_underscore = replace(local.csi,"-","_")
12+
csi_underscore = replace(local.csi, "-", "_")
1313

1414
default_tags = merge(
1515
var.default_tags,
1616
{
17-
Name = local.csi
17+
Name = local.csi
1818
Module = local.module
1919
},
2020
)

infrastructure/modules/aws-backup-source/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ variable "backup_copy_vault_account_id" {
9393
}
9494

9595
variable "backup_plan_config_s3" {
96-
description = "Configuration for backup plans"
96+
description = "Configuration for backup plans for s3"
9797
type = object({
9898
enable = bool
9999
selection_tag = string

0 commit comments

Comments
 (0)