Skip to content

Commit c10c2d8

Browse files
committed
chore: fmt and docs
1 parent 9f06f47 commit c10c2d8

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The `terraform-docs` utility is used to generate this README. Follow the below s
5959
| <a name="input_monitors"></a> [monitors](#input\_monitors) | A collection of cost anomaly monitors to create | <pre>list(object({<br/> name = string<br/> # The name of the monitor <br/> monitor_type = optional(string, "DIMENSIONAL")<br/> # The type of monitor to create <br/> monitor_dimension = optional(string, "DIMENSIONAL")<br/> # The dimension to monitor<br/> monitor_specification = optional(string, null)<br/> # The specification to monitor <br/> notify = optional(object({<br/> frequency = string<br/> # The frequency of notifications<br/> threshold_expression = optional(any, null)<br/> # The threshold expression to use for notifications<br/> }), {<br/> frequency = "DAILY"<br/> })<br/> }))</pre> | n/a | yes |
6060
| <a name="input_notifications"></a> [notifications](#input\_notifications) | The configuration of the notification | <pre>object({<br/> email = optional(object({<br/> addresses = list(string)<br/> }), null)<br/> slack = optional(object({<br/> secret_name = optional(string, null)<br/> # An optional secret name in the AWS Secrets Manager, containing this information <br/> lambda_name = optional(string, "cost-anomaly-notification")<br/> # The name of the Lambda function to use for notifications <br/> webhook_url = optional(string, null)<br/> # The URL of the Slack webhook to use for notifications, required if secret_name is not provided<br/> }), null)<br/> })</pre> | n/a | yes |
6161
| <a name="input_tags"></a> [tags](#input\_tags) | A map of tags to add to all resources | `map(string)` | n/a | yes |
62-
| <a name="input_accounts_id_to_name"></a> [accounts\_id\_to\_name](#input\_accounts\_id\_to\_name) | A mapping of account id and account name - used by notification lamdba to map an account ID to a human readable name | `map(string)` | `null` | no |
62+
| <a name="input_accounts_id_to_name_parameter_arn"></a> [accounts\_id\_to\_name\_parameter\_arn](#input\_accounts\_id\_to\_name\_parameter\_arn) | The ARN of your parameter containing the your account ID to name mapping. This ARN will be attached to lambda execution role as a resource, therefore a valid resource must exist. e.g 'arn:aws:ssm:eu-west-2:0123456778:parameter/myorg/configmaps/accounts\_id\_to\_name\_mapping' to enable the lambda retrieve values from ssm. | `string` | `null` | no |
6363
| <a name="input_enable_notification_creation"></a> [enable\_notification\_creation](#input\_enable\_notification\_creation) | Indicates whether to create a notification lambda stack, default is true, but useful to toggle if using existing resources | `bool` | `true` | no |
6464
| <a name="input_enable_sns_topic_creation"></a> [enable\_sns\_topic\_creation](#input\_enable\_sns\_topic\_creation) | Indicates whether to create an SNS topic within this module | `bool` | `true` | no |
6565
| <a name="input_identity_center_role"></a> [identity\_center\_role](#input\_identity\_center\_role) | The name of the role to use when redirecting through Identity Center | `string` | `null` | no |

examples/basic/main.tf

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ module "cost_anomaly_detection" {
8181
webhook_url = "https://hooks.slack.com/services/FAKE/URL"
8282
}
8383
}
84-
tags = var.tags
84+
tags = var.tags
8585
accounts_id_to_name_parameter_arn = "arn:aws:ssm:eu-west-2:0123456778:parameter/myorg/configmaps/accounts_id_to_name_mapping"
86-
identity_center_start_url = null
87-
identity_center_role = null
86+
identity_center_start_url = null
87+
identity_center_role = null
8888
}

examples/existing_sns/main.tf

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,6 @@ module "cost_anomaly_detection" {
6565
}
6666

6767
accounts_id_to_name_parameter_arn = "arn:aws:ssm:eu-west-2:0123456778:parameter/myorg/configmaps/accounts_id_to_name_mapping"
68-
identity_center_start_url = null
69-
identity_center_role = null
68+
identity_center_start_url = null
69+
identity_center_role = null
7070
}

main.tf

+10-10
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ module "notifications" {
55
source = "appvia/notifications/aws"
66
version = "2.0.0"
77

8-
allowed_aws_services = ["budgets.amazonaws.com", "costalerts.amazonaws.com", "lambda.amazonaws.com"]
9-
create_sns_topic = local.enable_sns_topic_creation
10-
email = local.email
11-
enable_slack = local.enable_slack
12-
slack = local.slack
13-
sns_topic_name = var.sns_topic_name
14-
tags = var.tags
15-
accounts_id_to_name_parameter_arn = var.accounts_id_to_name_parameter_arn
16-
identity_center_start_url = var.identity_center_start_url
17-
identity_center_role = var.identity_center_role
8+
allowed_aws_services = ["budgets.amazonaws.com", "costalerts.amazonaws.com", "lambda.amazonaws.com"]
9+
create_sns_topic = local.enable_sns_topic_creation
10+
email = local.email
11+
enable_slack = local.enable_slack
12+
slack = local.slack
13+
sns_topic_name = var.sns_topic_name
14+
tags = var.tags
15+
accounts_id_to_name_parameter_arn = var.accounts_id_to_name_parameter_arn
16+
identity_center_start_url = var.identity_center_start_url
17+
identity_center_role = var.identity_center_role
1818
}
1919

2020
## Provision the cost anomaly detection for services

0 commit comments

Comments
 (0)